1

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.

1
  • Did you figure this out? I need it too!
    – xcorat
    Commented Oct 22, 2015 at 4:42

1 Answer 1

0

Try changing "-depth 8" to "-depth rgb" (or "-depth cmyk").

3
  • Magick: invalid argument for option `-depth': rgb @ error/convert.c/ConvertImage Command/1167. Looks like it isn't a valid argument, but cannot look it up because imagemagick.org seems to be down, I cannot access the google cached version either.
    – rumtscho
    Commented Mar 10, 2011 at 18:04
  • Hmm, my next comment is from the documentation. I'm in error as I mis-read it. Try "-depth 24" for 24-bit colour. Commented Mar 11, 2011 at 15:38
  • -depth valuedepth of the image.<br><br>This the number of bits in a color sample within a pixel. Use this option to specify the depth of raw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change the depth of any image after it has been read. Commented Mar 11, 2011 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .