Page 1 of 1

Convert 32-bit Jpegs to 24-bit

Posted: 2010-09-06T05:50:36-07:00
by bjn
I have what jpeginfo identifies as 32-bit Jpegs. They're displaying fine in Firefox on my Linux machine but not in IE8 on my Windows VM. They're also much larger in filesize than I would have expected.

How can I convert them down to normal 24-bit Jpegs? I certainly don't need any kind of alpha channel.

I've tried
$ convert file.jpg -flatten +matte file2.jpg
but they still identify as 32-bit and won't display in IE.

Imagemagick's own identify command says this:
cirrusmosaic_thumb.jpg JPEG 302x271 302x271+0+0 8-bit DirectClass 154KiB 0.000u 0:00.000

An example of such an image is up at http://users.ecs.soton.ac.uk/bjn/cirrusmosaic_thumb.jpg

Thanks.

Re: Convert 32-bit Jpegs to 24-bit

Posted: 2010-09-06T07:32:16-07:00
by el_supremo
Your image uses the CMYK colourspace which is why it appears to be 32-bit. This will fix it:

Code: Select all

convert cirrusmosaic_thumb.jpg -colorspace rgb cirrusmosaic_rgb.jpg
Pete

Re: Convert 32-bit Jpegs to 24-bit

Posted: 2010-09-06T07:43:35-07:00
by bjn
Thanks very much. This was the solution.