convert, libpng and "Ignoring incorrect gAMA value" message

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
DominiqueMichel
Posts: 4
Joined: 2013-04-29T03:24:47-07:00
Authentication code: 6789

convert, libpng and "Ignoring incorrect gAMA value" message

Post by DominiqueMichel »

Hi all,

I use convert in FVWM-Crystal with a bash script to generate the icons used into the application menu. Those icons are generated from the application provided icons. fvwm-crystal.generate-menu

The call to convert is very basic:

Code: Select all

convert -resize 48x48 "input_file" "/path/to/icons/48x48/apps/application_name.png"
"input_file" can be any kind of GNU/Linux icon files.

At Fvwm-Crystal restart, some of the converted files gave me warnings like:

Code: Select all

libpng warning: Ignoring incorrect gAMA value .55 when sRGB is also present
I try to run convert on the generated files and most of the warnings was gone. After 2 more times, all warnings was gone. My fix for Fvwm-Crystal script is to run convert 3 more times on the converted files, and it seam to work very well in practice:

Code: Select all

convert "/path/to/icons/48x48/apps/application_name.png" "/path/to/icons/48x48/apps/application_name.png"
convert "/path/to/icons/48x48/apps/application_name.png" "/path/to/icons/48x48/apps/application_name.png"
convert "/path/to/icons/48x48/apps/application_name.png" "/path/to/icons/48x48/apps/application_name.png"
Is it some way to simplify this, some command I can use instead of those 4 convert calls that will convert the original icon files and give a "clean" result?
Post Reply