Eddy
2
I can create a .exe with harmfull stuff and rename it to .jpg. So yes they can contain harmfull code. But with image formats the code will not be run if you open it in a image viewer/editer. So you will be safe.
For movie formats:
avi is not a movie format, but a container. A file with extension .avi can be mpeg, divx, xvid etc etc. It is possible to put code in it that automaticly opens a website so you will get infected that way. Downloaded movies are ALWAYS a security risk.
Just buy the music/movies you want. You will have no security risk, you will have good quality and you are not steeling that way.