Page 1 of 1

Images are dull after optimising for web

Posted: 2017-08-04T03:54:14-07:00
by just kemp
Hi,

I'm currently trying to optimise some jpgs for our website. But something in the optimisation processes is causing the images to become dull.

I've tried using ImageOptimizer with OptimalCompression set to true -> results in dull image

Also tried MagickImage with Strip() option -> results in dull image

However MagickImage with just the quality changed and no Strip() leaves the image with the original colours.

So the strip is removing something that affects the hue? or intensity of the colours.

Is this a known issue, if so is there a way to work with ImageOptimizer.OptimalCompression without the colour intensity loss?

Re: Images are dull after optimising for web

Posted: 2017-08-04T05:06:51-07:00
by snibgo
What version IM? On what platform? Sample image?

If "-strip" changes colours, then something that was stripped was essential. I would guess this is a colorspace. Perhaps the image was in AdobeRGB, and the "-strip" discards that metadata. A better action would be to convert it to sRGB.

Re: Images are dull after optimising for web

Posted: 2017-08-06T11:29:51-07:00
by just kemp
sorry for the late reply, I hadn't set it to notify me.

I've checked the colorspace and it says sRGB, I'm using Magick.NET-Q16-AnyCPU Version 7.

A copy of the image is here: https://www.vouchercodeocean.co.uk/imag ... ts/org.jpg and here: https://www.vouchercodeocean.co.uk/imag ... /strip.jpg

Re: Images are dull after optimising for web

Posted: 2017-08-06T14:29:48-07:00
by snibgo
"identify -verbose" says it has an embedded AdobeRGB profile. This is metadata that says what the pixel numbers mean. When you "strip" the profile, software will assume the encoding is sRGB, but it isn't.

The cure is: don't strip, or convert to sRGB (eg with "-profile sRGB.icc") before stripping.

Re: Images are dull after optimising for web

Posted: 2017-08-07T02:23:37-07:00
by just kemp
Thanks I've updated my c# code to keep that and looks much better now!