How to open an image with an invalid jpeg marker type?
May 20, 2009 2:40 PM   Subscribe

I was sent a CD of images today, however none of them will open in any application I have. I'm getting an unknown or invalid jpeg marker type message. Does anyone know a way around this?

I'm using a MacOSX 10.4.11 and trying to open them mostly in PhotoShop 7.0. If I just double click on them I get this error message Couldn’t open the file. It may be corrupt or a file format that Preview doesn’t recognize. or if I open them with PhotoShop I get this message Could not open because an unknown or invalid jpeg marker type is found.

I've been looking through a few forums on the subject and they suggest renaming the extensions or copying the files on to another drive. I've tried this without any success, I've also tried opening them with GraphicConverter X V4.9 and that supsected that they weren't even image files. The jpeg icons look right and they are around the right size. Is there anything else I can try or is the CD corrupt and that's that?

I wanted to try all available options before asking the man who sent me the disc to send it to me again, as he was already doing me a huge favour and he has been really hectic looking after his best friend in the hospital.
posted by seaweed to Technology (14 answers total) 4 users marked this as a favorite
You're probably out of luck, but you could try running them through File Juicer.
posted by designbot at 2:54 PM on May 20, 2009

If you have access to Windows, IrfanView will open many jpgs despite an invalid jpeg marker.
posted by sageleaf at 2:58 PM on May 20, 2009

Also on Windows, MS Paint - believe it or not - would open files that Photoshop said were corrupted.
posted by spoons at 3:04 PM on May 20, 2009

This may be a weird question, but are you sure the images are actually jpegs? I occasionally get image files that are missing the file extension, and Photoshop will automatically assume they're jpegs when they're actually tiffs or pngs. Renaming the files usually works in these cases.
posted by lekvar at 3:20 PM on May 20, 2009

seconding lekvar's possibility the image isn't what you think.

Also I've found some JPEGs that won't open in anything else (including Internet Explorer) open in GIMP. I then save them back out of GIMP and they open fine everywhere. (and GIMP is free so it doesn't hurt to try)
posted by arniec at 3:28 PM on May 20, 2009

Try dragging-and-dropping the file into your browser. If it displays, you should then be able to right-click it and save it again to a new filename, and presumably the browser will clean up the file format.

(It'll need to have a file extension, so that the browser knows to treat it like an image.)
posted by Chocolate Pickle at 3:31 PM on May 20, 2009

Thirding lekvar, plus I have had trouble (on Windows) with files with a .jpeg vs. jpg. I was able to rename them then open them.
posted by JoanArkham at 3:55 PM on May 20, 2009

Can you post one somewhere so we can look at the file?
posted by DarkForest at 4:23 PM on May 20, 2009

You can open Terminal and type:

file /path/to/file

...or you can type the word file, a space, and drag one of the files into the terminal and hit return.

This will use magic numbers to determine the file type, which you can then change to the correct file type if necessary.
posted by tomierna at 4:30 PM on May 20, 2009

I've had that problem a few times. If you can get them to open in ANY program (as per Chocolate Pickle's suggestion to open in a browser) and re-save, they'll probably be fine.
posted by nosila at 6:51 PM on May 20, 2009

Most of them seem to be opening with File Juicer, they have a small watermark at the side but I can work with that. I couldn't get GIMP to work as I was missing a AppleX11, I think my installation disc is on another continent, also no availability to Windows at the moment.

I've posted one here
if you're still curious but I'm happy to work with File Juicer. There is something definitely up with the extension, when I dragged the images into Terminal they showed up as jpgs but when I brought them through Juicer, what I thought was one image ended up being three. I'm confused but able to work with them.

Thanks for all your help.
posted by seaweed at 7:53 PM on May 20, 2009

I had a similar problem at work recently – a series of images were scanned and saved (in Photoshop Elements) on the same machine (XP), but yielded errors in every program that I attempted to open them with.

Switching to thumbnail view in Explorer and waiting for the thumbnail image to load before opening them managed to work. I have no idea why.
posted by avocet at 10:41 PM on May 20, 2009

I had a look at the sample image. There seems to be 77824 bytes of a different JPEG (or some other compressed data) stuck on the front. If you find the correct JPEG header in there (FF D8 FF E1) and save the rest out the file is fine. I can't really guess how it got like that, it looks like they stuck a bunch of files together then chopped them up at the wrong positions.
posted by samj at 1:56 AM on May 21, 2009

Thanks samj, I'll check it out.
posted by seaweed at 6:17 AM on May 21, 2009

« Older Looking for a speedier Hard Drive   |   Where should I watch the Champions League Final in... Newer »
This thread is closed to new comments.