Page 1 of 1

"Invalid SOS parameters for sequential JPEG" error

Posted: 2016-08-20T09:02:42-07:00
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

Re: "Invalid SOS parameters for sequential JPEG" error

Posted: 2016-08-20T09:13:03-07:00
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.

Re: "Invalid SOS parameters for sequential JPEG" error

Posted: 2016-08-21T09:48:52-07:00
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.

Re: "Invalid SOS parameters for sequential JPEG" error

Posted: 2016-09-09T03:40:08-07:00
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.