Page 1 of 1

Bad background with new imagemagick

Posted: 2011-03-15T08:20:26-07:00
by HeiHon
Hello, I am using imagemagick to convert pdf files to tif and jpeg.

With im6.6.5-0 I do something like

Code: Select all

convert page.pdf page.tif
and my page with black text on white paper is converted to a tif with black text on white background.
When I do the same with im6.6.8-4 (I think any im > 6.6.7) I get something like black text on black background.

With

Code: Select all

identify -verbose page.pdf
I get

Code: Select all

Image: page.pdf
  Format: PDF (Portable Document Format)
  Class: DirectClass
  Geometry: 1117x1597+0+0
  Resolution: 72x72
  Print size: 15.5139x22.1806
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 16/8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
...
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 5.352MB
  Number pixels: 1.784M
  Pixels per second: 111.5M
  User time: 0.016u
  Elapsed time: 0:01.015
  Version: ImageMagick 6.6.5-0 2010-10-10 Q16 http://www.imagemagick.org
with older im and

Code: Select all

Image: page.pdf
  Format: PDF (Portable Document Format)
  Class: DirectClass
  Geometry: 1117x1597+0+0
  Resolution: 72x72
  Print size: 15.5139x22.1806
  Units: Undefined
  Type: TrueColorMatte
  Endianess: Undefined
  Colorspace: RGB
  Depth: 16/8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
    alpha: 8-bit
  Channel statistics:
...
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 584KBB
  Number pixels: 1.784MB
  Pixels per second: 28.32MB
  User time: 0.063u
  Elapsed time: 0:01.062
  Version: ImageMagick 6.6.8-4 2011-03-11 Q16 http://www.imagemagick.org
with new im.
So new im sees a different Image Type.
The pdf file is produced as a CMYK Postscript file which then is distilled by Distiller 8 to RGB pdf.
I tried

Code: Select all

convert -alpha deactivate page.pdf page.tif
and this rendered black text on white background.
But how do I do that with Image::Magick?