PNG Compression Level With -define...

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?".
stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

PNG Compression Level With -define...

Postby stupid » 2012-01-30T03:45:30-07:00

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.

Bonzo
Posts: 2259
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England
Contact:

Re: PNG Compression Level With -define...

Postby Bonzo » 2012-01-30T05:37:10-07:00

First thing I would try is putting the code in between ""

Code: Select all

-define "png:compression-level=0"

User avatar
glennrp
Posts: 856
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: PNG Compression Level With -define...

Postby glennrp » 2012-01-30T06:33:07-07:00

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.

stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Re: PNG Compression Level With -define...

Postby stupid » 2012-01-30T07:36:24-07:00

Thanks for the fix, and the update glennrp.

s.

User avatar
glennrp
Posts: 856
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: PNG Compression Level With -define...

Postby glennrp » 2012-01-30T13:58:11-07:00

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.

stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Re: PNG Compression Level With -define...

Postby stupid » 2012-01-31T04:47:00-07:00

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.


Return to “Users”

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests