Hi,
I have a question regarding the performance of ImageMagick:
I use ImageMagick to convert pdf-files (e.g c:\scan001.pdf, c:\scan002.pdf, c:\scan003.pdf) to 'cropped' bmp-files (e.g. c:\emails\scans\scan001.bmp, etc) (the cropping is done because later OCR-software has to analyze only that specific zone of the file). Everything works great, except the performance of the converting and cropping by ImageMagick.
This is the statements I use:
"C:\Program Files\ImageMagick-6.4.0-Q16\convert.exe" -crop 50%x4%+250+740 -depth 1 -density 300x300 c:\scan001.pdf c:\emails\scans\scan001.bmp
It takes about 2 till 8 seconds to convert (sometimes 2 seconds, sometimes 8 seconds, depending on the amount of text, pictures, etc. on the specific zone of the pdf-file). (I know, it's not really long, but I have to repeat this action about 200 times a day!!). One way to increase performance is to use a density of 200x200, but then I run into problems with the OCR-software.
Hope you have any suggestions how to increase the speed!
(More info: Windows XP SP2, 2.60 GHz, RAM 1 GB, ImageMagick version: ImageMagick-6.4.0-Q16 )
Regards,
Leonard
How to increase performance with "convert pdf to bmp"
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to increase performance with "convert pdf to bmp"
The slow speed in PDF handling is because IM has to read, and write the image appropriately so that GHOSTSCRIPT can convert it to a raster image. You can probably improve performance by calling ghostscript to convert the PDF yourself, and then pipeline its output (perhaps already cropped) to IM for the final output conversion to BMP format.
Experiment.
Experiment.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/