"Invalid SOS parameters for sequential JPEG" error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Pgscannell
Posts: 2
Joined: 2016-08-12T18:43:54-07:00
Authentication code: 1151

"Invalid SOS parameters for sequential JPEG" error

Post by Pgscannell »

This is my command line that I'm trying to run:

magick Selfie.jpg -resize 100x133 Images/Selfie.jpg

The JPG file was a photo taken by my smart phone. It has a size of about 1.8 mb and I want to resize it.

But, I get this error message: Invalid SOS parameters for sequential JPEG 'Selfie.jpg'

Is there anything I'm doing wrong? Do you have to do something special with photos coming from a smart phone?

Just for a try, I took another .jpg file that was much smaller and I was able to resize it.

Thanks in advance,
Paul
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: "Invalid SOS parameters for sequential JPEG" error

Post by snibgo »

I suppose the JPEG contains something that IM (or the delegate library) doesn't understand.

If you upload it somewhere and paste the link here, someone might take a look.
snibgo's IM pages: im.snibgo.com
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: "Invalid SOS parameters for sequential JPEG" error

Post by Bonzo »

Searching online there are quite a few posts about that error and phones.

One reply to a similar question:
This is libjpeg complaining about bad jpeg file structure. Not much can be done about it.
simaocampos
Posts: 1
Joined: 2016-09-09T03:30:54-07:00
Authentication code: 1151

Re: "Invalid SOS parameters for sequential JPEG" error

Post by simaocampos »

I had a similar problem (taken with a Samsung S5) but it was gone after I cleaned up the images with IrfanView JPEG lossless conversion plugin, option "None (can be used for optimizing and cleaning)". So it indeed seems to be a data structure issue with the JPEG file. Curiously, it does not happen to all pictures I take with this phone.
Post Reply