View Single Post
Old 09-04-2019, 03:54 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Converting pdf to png images

Hi

In order to pre-process image files with scantailor, I may have to convert some source PDF to png files.

There are some online services that do this, I prefer doing it using imagemagick.

Second try on a 14 pages pdf extract from a bigger book gave this:

Code:
convert garnier.pdf garnier.png
convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `garnier.png' @ warning/png.c/MagickPNGWarningHandler/1748.
[roger@lenovo roger]$
It converted nearly instantly all the pages which is pretty good but I am not sure to understand the information above. Has somebody some knowledge about it?

Even adding parameters like -quality 100, or -density 300, one such image has a 27k only size, while the same image processed with, say pdfcandy online service at medium resolution has a 55k size (see screenshot). Does this difference may hinder the ocr process later?

The second image (001) comes from pdfcandy
Attached Thumbnails
Click image for larger version

Name:	garnier-0.png
Views:	452
Size:	25.6 KB
ID:	173226   Click image for larger version

Name:	garnier_p001.png
Views:	470
Size:	54.3 KB
ID:	173227  

Last edited by roger64; 09-04-2019 at 04:22 AM. Reason: quality
roger64 is offline   Reply With Quote