ImageMagicK throwing a “convert: Invalid SOS parameters for sequential JPEG” warning

ImageMagick logoC:\Pictures>"magick convert -border 3024x! old.jpg new.jpg
convert: Invalid SOS parameters for sequential JPEG ‘old.jpg’ @ warning/jpeg.c/JPEGWarningHandler/398.

In this case, caused by a bug with how a Samsung phone writes jpeg files.

Checked the original file details to verify that:

ImageMagicK did process the photos.  It was just warning me that it found a possible issue.

The warnings can be suppressed with the -quiet option.

How to avoid photo cropping by adding a border

So in Notes on ImageMagick’s –border option, I mentioned that I had photos that don’t fit on 6×4 photo paper.

Here’s an example which I uploaded to the photo printing website:

The result is that the photo printing company has darkened the left and right of the photo, to highlight what I’m going to lose.  ie. cropped!

If only there was someway to change the photo to fit into a 6×4 print…

I’m glad you asked!

Continue reading

Notes on ImageMagick’s –border option

ImageMagickI have photos whose aspect ration are not 1.5, which means they will be cropped when I use 6:4 photography paper.

The important thing to remember is that ImageMagick will keep the aspect ratio unless you tell it not to with the “!” option.

So the command to add a left and right border to an image is this:
magick convert -border 2000x! old.jpg new.jpg

To break that down:
convert the file into a new image file.
2000 add 2000 pixels to left AND right side of image
x! height is not specified here.  The ! tells ImageMagick to not preserve the aspect ratio.

Similarly, in order to add to the top and bottom of the photo, I use this command:
magick convert -border !x2000 old.jpg new.jpg

The world knows where you live – that is not good.

It might be a bit of a surprise to you, it certainly was to me.  The Apple iPhone stores the location of where a photo was taken.  It’s known as Location.  Or geo-location with other makes of phones/cameras.  Seems harmless enough, doesn’t it.

Except when some enterprising people decide to create a Firefox plug-in which lets you view the GPS co-ordinates, then link you though, to say Google Maps.

iPhone photo - we know where you liveOr not.  "42° 53? 7.60? S, 147° 19? 35.54? E" is a church in Tasmania.  I selected it at random, to mask the real address.

Bookmark and Share