I have recently watched this video of a Finnish internet security expert. Somewhere around eleventh minute, he talks about a virus which is hidden in an image and executes
Some image formats have specified actual code sections, supposedly to be executed on error. You might find it interesting to read up on the Windows Metafile image format and the MICE vulnerability.
Wikipedia says: "... the vulnerability is an inherent defect in the design of WMF files, because the underlying architecture of such files is from a previous era, and includes features which allow actual code to be executed whenever a WMF file opens." --- https://en.wikipedia.org/wiki/Windows_Metafile_vulnerability
The same article also quotes Secunia, but does not include a citation: "The vulnerability is caused due to an error in the handling of Windows Metafile files ('.wmf') containing specially crafted SETABORTPROC 'Escape' records. Such records allow arbitrary user-defined function to be executed when the rendering of a WMF file fails."