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?".

PNG Compression Level With -define...

Postby stupid » 2012-01-30T03:45:30+00: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.
stupid
 
Posts: 51
Joined: 2010-02-12T07:30:34+00:00

Re: PNG Compression Level With -define...

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

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

Code: Select all
-define "png:compression-level=0"
Bonzo
 
Posts: 2129
Joined: 2006-05-20T08:08:19+00:00
Location: Cambridge, England

Re: PNG Compression Level With -define...

Postby glennrp » 2012-01-30T06:33:07+00: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.
User avatar
glennrp
 
Posts: 774
Joined: 2006-04-01T08:16:32+00:00
Location: Maryland 39.26.30N 76.16.01W

Re: PNG Compression Level With -define...

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

Thanks for the fix, and the update glennrp.

s.
stupid
 
Posts: 51
Joined: 2010-02-12T07:30:34+00:00

Re: PNG Compression Level With -define...

Postby glennrp » 2012-01-30T13:58:11+00: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.
User avatar
glennrp
 
Posts: 774
Joined: 2006-04-01T08:16:32+00:00
Location: Maryland 39.26.30N 76.16.01W

Re: PNG Compression Level With -define...

Postby stupid » 2012-01-31T04:47:00+00: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.
stupid
 
Posts: 51
Joined: 2010-02-12T07:30:34+00:00


Return to Users

Who is online

Users browsing this forum: No registered users and 7 guests