Imagemagick convert creates monochrome output only

Posted by rumtscho on Super User See other posts from Super User or by rumtscho
Published on 2011-03-10T14:07:26Z Indexed on 2011/03/10 16:13 UTC
Read the original article Hit count: 257

Filed under:
|
|

I have a book scan as a pdf. When I open it with Adobe Reader, it looks like grayscale. When I open it with IrfanView, it looks like grayscale, and the Information option tells me that the image is actually 24 bit (I don't know if this is the real bit depth of the image embedded in the pdf or if IrfanView assigns the maximal depth when opening a pdf as image).

enter image description here

I want to OCR the scan with OmniPage SE. It doesn't read PDF, so I decided to use ImageMagick to convert the file to PNG first. But no matter what I try, the output is always monochrome and practically unreadable.

enter image description here

I tried different conversion lines, with different depth, density and resize values, but it didn't help. What you see was made with the options convert testfile.pdf -density 600x600 -depth 8 PNG:testfile.png.

Any idea what causes the problem?

Edit: To make it clear, the output looks like this for any value of -density, -depth and -resize I have tried. It also looks like that when I use no options at all, as in convert testfile.pdf PNG:testfile.png.

© Super User or respective owner

Related posts about pdf

Related posts about imagemagick