-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 18.07.2010 13:42, Vinay Pawar wrote:
> Hi, 
> 
> Using awesome-3.4.6, with libpng-1.2.42 and ImageMagick-6.5.6
> 
> Following is a little patch that fixes the error(ignorable) i get at build 
> time. 
> 
> '-gamma 0.6' was added for old ImageMagick compatibility but appears to be 
> interfering with the new versions. Also newer ImageMagick-6.5.5 onwards 
> there's a new -auto-gamma which could be used in the future. 
> 
> The 'incorrect gamma=(0/100000)' error is returned by libpng, use 'display 
> -verbose <bad-generated-png>' to check sanity of image.
> 
> 'convert -gamma 0.6 -channel A -evaluate Multiply 0.4 <image> <new-image>'
> 'convert -auto-gamma -channel A -evaluate Multiply 0.4 <image> <new-image>'
> 'convert -channel A -evaluate Multiply 0.4 <image> <new-image>'
> 
> All 3 above commands produce the same image visually. Either '-auto-gamma' 
> should be used or '-gamma' should be dropped. 

Sorry, but the resulting images do look different.
I grabbed the titlebar icons from the default theme, moved them into their own
dir and ran this uglyness:

for img in *png
do
  for x in '-gamma 0.6 -channel A -evaluate Multiply 0.4' '-channel A -evaluate
Multiply 0.4' '-auto-gamma  -channel A -evaluate Multiply 0.4'  '-evaluate Pow 2
 -channel A -evaluate Multiply 0.4'
  do
    convert "$img"  $x  "$img: $x.png"
  done
done

I then viewed the result with 'feh --index .'.

My findings are that especially no gamma option and '-auto-gamma' produce
different images than what got now. This leaves us with '-gamma 0.6' which is
what we are currently using and '-evaluate Pow 2' which was used before, but was
dropped for compatibility with newer ImageMagick.

Cheers,
Uli

- -- 
- - Buck, when, exactly, did you lose your mind?
- - Three months ago. I woke up one morning married to a pineapple.
  An ugly pineapple... But I loved her!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJMQvjjAAoJECLkKOvLj8sGzR8IAMlkg+Ya5bUjfDU920SRjhiB
/OVLcj1+sYZu1RbhUW10BFxbc1zvy3uz7FcdNqe9y84E5NqbOYiAAIBgQ1h7xai/
lCC9CbxlC7SHhjqG6G3Ebi+gQc/5JsJPhrZjpEOhFytAvw4a3wkewUXXUCot8CUy
HrCMdYgVQzzMnnsEYnfmLeRENOlSmc0PzAsCOm9ipQEFUrj0WTiA53YoImfehOEQ
8uPJVu/0m3T/60B8OnodbLoMSogT7F0gdpK9WEFaLM8UnQP7MLRAEsz8SH1aFDqj
PwXXJ2+yH84iCWdlacoSzw8Ip8kj5v8BaTk8L6uSgqoqa4JbVL5tsmpAXYK0oXo=
=EonJ
-----END PGP SIGNATURE-----

-- 
To unsubscribe, send mail to [email protected].

Reply via email to