Photoshop can not open a JPEG but somehow Microsoft Paint can

5

I received a lot of pictures that I want to edit on Photoshop. When I attempt to open them in Photoshop,The following pops up:

"Could not complete your request because an unvalid SOS, DHT, DQT, or EQI JPEG marker is found before a JPEG SQ1 marker."

I found a solution which is to open the file in Microsoft Paint, and save them under the same name, which rewrites the file. Now Photoshop can open the file. This is a lot of work to do for every image.

How do I fix this? I can't believe that MS Paint can do it, but Photoshop can't.

Nicky Smits

Posted 2014-12-14T19:00:21.137

Reputation: 245

Something strange there. Tried Import instead of Open? (if PS has that?) It may not, GIMP doesn't... Maybe it's a PS jpeg bug? – Xen2050 – 2014-12-14T19:03:57.497

I tried. The message is basically the same. – Nicky Smits – 2014-12-14T19:06:16.647

Those JPEGs are most likely corrupt. However, some programs are able to parse files even though they might be slightly corrupt. Looks like Microsoft Paint is one such program. – Vinayak – 2014-12-14T19:06:21.773

I found a similar question on Adobe forums. Are you sure the photos are JPEGs and not PSDs?

– Vinayak – 2014-12-14T19:12:36.580

If they are corrupt. It seems weird that Paint can parse it and Photoshop can not. Isn't there a resolution for this?? – Nicky Smits – 2014-12-14T19:14:09.200

1

As I wrote earlier, some programs are still able to parse slightly corrupted media files. One solution that comes to mind is to use image processing software like Image Magick to batch convert all JPEGs to PNGs. That wouldn't result in loss of quality as PNG is lossless.

– Vinayak – 2014-12-14T19:21:54.357

Converting JPG to PNG would certainly avoid the problem, but imposing it on every JPEG you come across is unworkable for certain environments. It would be best if we could detect the problem with some library. – Ross Presser – 2018-10-04T04:53:37.080

Answers

2

As pelms' answer indicates, the problem is typically a mismatched filename extension. Irfanview is good for this problem. It's a free image viewer, editor, organiser and converter program. If you open an image that has an incorrect extension, it will recognize the problem and usually recognize the actual image type. It will ask you if you want to fix the filename, and handle it for you. It's a fast, automated solution requiring a couple of mouse clicks, and saves the need to manually investigate the file header in a text editor.

fixer1234

Posted 2014-12-14T19:00:21.137

Reputation: 24 254

This works. No upvote??!! – Soon Santos – 2019-06-05T23:22:01.593

0

Sounds like you have a file extension that doesn't match the actual file type.
For example, if you take a PNG image file, change the file extension to .jpg and try to open in Photoshop, you'll get a message something like:

"Could not complete your request because an unknown or invalid JPEG marker type is found"

Try opening a file in a text editor (e.g. Notepad). JPEGs should start with the characters
ÿØÿá, PNGs with ‰PNG and GIFs with GIF87a or GIF89a.

If this is the case for you, try renaming with the correct file extension.

pelms

Posted 2014-12-14T19:00:21.137

Reputation: 8 283

JPEG files may always begin with ÿØÿá, but the more easily remembered marker (in my opinion) is that bytes 6-9 always contain JFIF (JPEG File Interchange Format).

– Scott – 2019-01-13T00:20:15.300