Image negated when converting from png to pdf

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
hanche

Image negated when converting from png to pdf

Post by hanche »

On some images, convert inverts (or negates in imagemacick lingo) the image on converting from png to pdf. The following image is an example:

Image

Consider these ways of converting the image:

Code: Select all

convert -compress Fax -density 200 -units pixelsperinch this.png that-i.pdf
convert -compress Fax -density 200 -units pixelsperinch -negate this.png that-ii.pdf
convert this.png png:- | convert -compress Fax -density 200 -units pixelsperinch - that-iii.pdf
Here, that-i.pdf and that-ii.pdf are both negated (inverted), while that-iii.pdf is not.

This happens on Mac OS X with ImageMagick installed via macports. The port version is 6.5.5-7_0+q16, and convert -version says: ImageMagick 6.5.5-7 2009-09-12 Q16.

On a side note, the arguments -units pixelsperinch are really necessary here, in spite of the documentation stating that pixels per inch is the default unit. Otherwise it density appears to be assumed to be in pixels per centimeter. Either the software or the documentation needs to be changed.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Image negated when converting from png to pdf

Post by magick »

We can reproduce the problem you posted and have a patch. Look for it in the Subversion trunk by sometime tomorrow. Thanks.
Post Reply