convert to icon darkens colours?

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
robitabu
Posts: 4
Joined: 2013-01-30T02:09:24-07:00
Authentication code: 6789

convert to icon darkens colours?

Post by robitabu »

Hi everybody,
I'm new here, I really hope someone can help out.

I've been using ImageMagick in the past for converting jpg/png file into Windows icons, worked ok :-)

Now I have a new installation on the same machine as before, Win7, ImageMagick v.6.7.6.3-2 running inside a Cygwin session (like before, but it's a new installation). Problem is, it darkens my icons and I don't understand why :-(

This is the result :
Image
Left image is the source PNG file. Right image is the icon resulting file (much darker than the original).

I used to run: convert icona.png icona.ico
It did the trick in the past, now it's changing my icons colour and I have no idea why. Any suggestion?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert to icon darkens colours?

Post by snibgo »

For some reason, the version of IM distributed with the current Cygwin is very dated, and somewhat broken in terms of RGB/sRGB. Junk it, and install the current version.
snibgo's IM pages: im.snibgo.com
robitabu
Posts: 4
Joined: 2013-01-30T02:09:24-07:00
Authentication code: 6789

Re: convert to icon darkens colours?

Post by robitabu »

That's pity :-(
I've successfully used the very same software combination on my old system, It was ImageMagick v.6.4.0 (I still have a copy of the old partition, with the cygwin/bin directory intact, there's "convert.exe" too).

Since I'm using it inside Cygwin because I made a few .sh scripts that do most of the work for me in a mostly full-automated way, I'd like to stay with the Cygwin environment nonetheless, but I can't see how I can update it manually. I know this is not a Cygwin forum (I will open a thread there eventually) but maybe someone already knows how to update ImageMagick in this environment too. Hints?
robitabu
Posts: 4
Joined: 2013-01-30T02:09:24-07:00
Authentication code: 6789

Re: convert to icon darkens colours?

Post by robitabu »

I got it! I got it! I followed instruction in http://www.imagemagick.org/script/binary-releases.php
And the darkening problems has been solved :-)
Thank you :-)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert to icon darkens colours?

Post by snibgo »

You can probably figure out for yourself more than I know, but the basic idea is:

- If you are happy installing from source, that's fine.

- The binary Windows release works fine under Cygwin. By default, it installs into "\program files (x86)" or somwhere horrible, but you can change that, or move the files afterwards.
snibgo's IM pages: im.snibgo.com
robitabu
Posts: 4
Joined: 2013-01-30T02:09:24-07:00
Authentication code: 6789

Re: convert to icon darkens colours?

Post by robitabu »

snibgo wrote:You can probably figure out for yourself more than I know, but the basic idea is:

- If you are happy installing from source, that's fine.

- The binary Windows release works fine under Cygwin. By default, it installs into "\program files (x86)" or somwhere horrible, but you can change that, or move the files afterwards.
The previous hint was very usefull and I did update ImageMagick in Cygwin already (see prev. post). Ver.6.8.1 works ok again :-) No need to recompile from source, i just used the precompiled binaries, and I installed them inside a $HOME subdirectory.

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

Re: convert to icon darkens colours?

Post by snibgo »

Good stuff.

I should add: IM has changed considerably since 6.4.0. In particular, it now assumes input and output images are sRGB ("non-linear"), but monochrome images (including separations) are RGB ("linear"). See any number of threads here where people have upgraded and the results are darker or lighter than they used to be. Operations like "equalize" suffer from this. When this occurs, the magic incantation is often something like "-set colorspace sRGB", which tells IM the image is already sRGB so doesn't need to be converted from RGB, which would increase the pixels values, which lightens them. Conversely, "-set colorspace RGB" for the opposite problem.
snibgo's IM pages: im.snibgo.com
Post Reply