Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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 Mar 10 '11 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. –  Randolf Richardson Mar 11 '11 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. –  Randolf Richardson Mar 11 '11 at 15:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.