Colorspace being lost on convert meaning washed out images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jeffski10
Posts: 3
Joined: 2013-06-26T06:23:53-07:00
Authentication code: 6789

Colorspace being lost on convert meaning washed out images

Post by jeffski10 »

I'm struggling to resize some image PNG's to retain the color profile or convert it to something that keeps the appearance.

Running the images through using :

convert 61R49EGLD_large_trans.png -resize 600x900 output.png

the resultant image is dull. I can see the color profile gets changes to sRGB from the AdobeRGB1998 one so I then tried converting setting the profile with -profile AdobeRGB1998.icc but this seems also to be lost.

The resultant image is washed out and loses the shine so I can see it must be profile related. The original is here:
http://media.topshop.com/wcsstore/TopSh ... _trans.png

Any one have ideas as to what command I can run that will convert it cleanly or get the profile to change retaining the gloss of the image.

Jeff
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Colorspace being lost on convert meaning washed out imag

Post by snibgo »

If you don't mention +profile or -profile in your command, IM should leave the profile alone. In 6.8.6-0 on Windows7,

Code: Select all

convert 61R49EGLD_large_trans.png -resize 600x900 output.png
doesn't change the profile.

Software often ignores profiles and assumes images are sRGB (resulting in a washed-out appearance because AdobeRGB has a larger gamut), so it is often a good idea to change the image to sRGB:

Code: Select all

convert 61R49EGLD_large_trans.png -profile sRGB.icc -resize 600x900 output.png
... where sRGB.icc is in your directory, or you need to put the full path.
snibgo's IM pages: im.snibgo.com
jeffski10
Posts: 3
Joined: 2013-06-26T06:23:53-07:00
Authentication code: 6789

Re: Colorspace being lost on convert meaning washed out imag

Post by jeffski10 »

So, I have tried again without specifying a profile. Just doing the straight resize the embeded Adobe RGB profile gets lost - I can see from an identify -verbose.

Then running a convert specifying the profile and the same appears. I'm got version 6.8.3-5 running - I assume there is nothing changed in a newer one?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Colorspace being lost on convert meaning washed out imag

Post by snibgo »

Running your command in 6.8.3-0, the profile is removed. This is (I suppose) a bug.

In 6.8.4-0, 6.8.5-0 and 6.8.6-0, the profile is not removed.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colorspace being lost on convert meaning washed out imag

Post by fmw42 »

Everything looks fine for me with your command in IM 6.8.6.2 Q16 Mac OSX and the Adobe profile can be found in the output meta data.

Viewed with Mac Preview and Safari.
Last edited by fmw42 on 2013-06-26T10:32:29-07:00, edited 1 time in total.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Colorspace being lost on convert meaning washed out imag

Post by glennrp »

Running 6.8.6-1, the ICC profile is preserved, verified by running "convert output.png output.icc" and examining output.icc with iccdump.
However, the resized one is somewhat different in appearance as you noted, when viewed with an app that doesn't do anything with profiles.
Just wondering: do the spikes represent ex-spouses?

I put the original file and converted file at http://www.simplesystems.org/users/glennrp/Shiny_rings/
Firefox 22 and 25 (nightly) both display the two images visually identical.
Chrome just shows a blank page.
jeffski10
Posts: 3
Joined: 2013-06-26T06:23:53-07:00
Authentication code: 6789

Re: Colorspace being lost on convert meaning washed out imag

Post by jeffski10 »

Thanks for this. So it does seem to be a version issue. Pulled down a newer copy and it converts OK so now just need to check the other scripts I run to see if any output is affected. Its pretty much identical now other than slightly softer so I will play with the sharpen to see if I can recover it a bit.

The only thing I notice is the transparent setting appears to be lost when viewing in some viewers but loading into Photoshop I can see it still there - so maybe there is something slightly corrupted on the original.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Colorspace being lost on convert meaning washed out imag

Post by glennrp »

jeffski10 wrote: The only thing I notice is the transparent setting appears to be lost when viewing in some viewers but loading into Photoshop I can see it still there - so maybe there is something slightly corrupted on the original.
Firefox shows the transparency. So does an old fork of "display" from ImageMagick 5.5.7 that I use.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Colorspace being lost on convert meaning washed out imag

Post by glennrp »

glennrp wrote: I put the original file and converted file at http://www.simplesystems.org/users/glennrp/Shiny_rings/
Firefox 22 and 25 (nightly) both display the two images visually identical.
Chrome just shows a blank page.
Chrome actually does show the two images, but much larger so you have to scroll to see anything but
the background. The scaled one looks much duller than the original.
areohbee
Posts: 23
Joined: 2010-09-29T21:05:23-07:00
Authentication code: 8675308

Re: Colorspace being lost on convert meaning washed out imag

Post by areohbee »

Using 6.8.6-3, icc profile getting dropped, 6.7.3 is aok.

on win7/64 - mogrifying jpegs.
Post Reply