Page 1 of 1

PNG Compression Level With -define...

Posted: 2012-01-30T03:45:30-07:00
by stupid
Using: ImageMagick-6.7.5-0-Q16-windows-static.exe

Hi, all.

I'm using this command:
-define png:compression-level=0

and getting this error message:
convert.exe: ignoring invalid defined png:compression-level =0 @ warning/png.c/WritePNGImage/11175.

In the error message, the space in front of the equals sign is not in my command. Am I missing something obvious or is it your problem?

Thanks.

Re: PNG Compression Level With -define...

Posted: 2012-01-30T05:37:10-07:00
by Bonzo
First thing I would try is putting the code in between ""

Code: Select all

-define "png:compression-level=0"

Re: PNG Compression Level With -define...

Posted: 2012-01-30T06:33:07-07:00
by glennrp
It's a bug in the PNG encoder ("if" should be "else if" at line 11146 in coders/png.c)
I will fix this evening when I get home.

Re: PNG Compression Level With -define...

Posted: 2012-01-30T07:36:24-07:00
by stupid
Thanks for the fix, and the update glennrp.

s.

Re: PNG Compression Level With -define...

Posted: 2012-01-30T13:58:11-07:00
by glennrp
stupid wrote:Thanks for the fix, and the update glennrp.

s.
Also note that the bug is harmless. You get the spurious warning message but
the coder does not in fact ignore the directive. The error has been fixed
in soon-to-be-released 6.7.5-1.

Re: PNG Compression Level With -define...

Posted: 2012-01-31T04:47:00-07:00
by stupid
Yup. I saw that the output file size was as expected; but it's difficult - for me - to check the integrity of the internal structure. Thanks again.

s.