A picture or photo in your PC can have different file extensions, such as jpeg, bmp, etc. Myths and legends say that a photo itself cannot contain a virus and it cannot infect your PC. A projected virus created using a stenography program out of any file, with a different file extension is not believed to contain a virus. These photos and pictures are a soft target for stenography programmers looking to infect a large database. It involves concealing data in different means, like in pictures, audio, or even concealed backdrop disturbance such as radio waves. You cannot receive or send viruses through images that include jpegs, .gifs, etc. but can you send or receive viruses through executable files like .exe, .scrg, etc.
A Jpeg file can contain a virus?
A Jpeg file can contain a virus.
A JPEG is a file can get infected. However, in order to activate the virus, the file must be run. As the JPEG file is an image file, it will not be executed as long as the image is not processed by any other type of program.
Hence, if the image is executed by a program like a library or a database, the system can get infected.
You can find more information about this issue on the following link: http://www.secureworks.com/research/threats/jpegvirus/