Page 1 of 1

remove colour profile without distortion

Posted: 2011-03-24T15:02:12-07:00
by arand
I am trying to replace/remove colour profiles in a set of images that have a HP copyright embedded in them (default photoshop stuff I guess).

I have tested to do this with GIMP, at it seems to manage to apply just a general colour profile without changing the image (pixel perfect).

However when I run convert -strip with imagemagick and then compare the result to the original it is clearly different.

These are rather basic images, one example is this:
Image
(Image itself is Copyright "appleflap" CC-BY-SA)

Am I doing things wrong?
Is there any way to do this with imagemagick and better retain the original image?

- arand

Re: remove colour profile without distortion

Posted: 2011-03-24T15:45:05-07:00
by fmw42
try putting back just the sRGB.icc profile after -strip. It works fine for me on IM 6.6.8.6 Q16 Mac OSX Tiger.

convert dangernm.jpg -strip -profile Profiles/sRGB.icc dangernm_strip_sRGB.jpg

Re: remove colour profile without distortion

Posted: 2011-03-24T19:35:39-07:00
by arand
Hmm, that still does not produce a pixel-perfect result like gimp's.
But it seems that my problem lies in fact that a simple

Code: Select all

convert danger_nm.jpg danger_nm_im.jpg
Does not produce a clone, but a slightly altered version.
Even if -quality 100 is used there are a few pixels not matching the original, isn't this supposed to be lossless?
Does your version output a pixel-perfect copy on a simple convert, if so, what version are you running? (debian 8:6.6.0.4-3 on my side)

Re: remove colour profile without distortion

Posted: 2011-03-24T19:38:59-07:00
by fmw42
jpg is a lossy format even at -quality 100. you need to use some lossless format (png, jp2, etc). I have no idea what GIMP is doing to get around that if it is using jpg for output. Try jp2 (jpeg2000 with the Jasper delegate)

I was using IM 6.6.8.6 Q16 Mac OSX Tiger.