Page 1 of 1

Very slow process PDF -> JPEG:

Posted: 2011-10-31T23:32:36-07:00
by YouPict.Ru
Hi!

System: CentOC5, Win 2003, Magick 6.7.3-3

Very slow process PDF -> JPEG:
File size 3MB

Code: Select all

use Image::Magick;          
$image = Image::Magick->new;
($width, $height, $size, $format) = $image->Ping("name.pdf");
print "$width, $height, $size, $format \n"; 
...
...
...
The process $image->Ping() takes about 50 seconds. The larger the file size, the longer the process.

But if the process BMP or etc-> JPEG, the process is instant!But as if a large file!

What's the problem?

Re: Very slow process PDF -> JPEG:

Posted: 2011-11-01T19:49:11-07:00
by anthony
PDF can not 'ping' as it has to be processed by a delegate (ghostscript) before IM understands it.

Ping is only possible with some image file formats. Generally those that are well defined and well known to IM, such that the basic information wanted is given in the immediate header, before the image data.

Re: Very slow process PDF -> JPEG:

Posted: 2011-11-01T22:54:41-07:00
by YouPict.Ru
Ping that is normally only handles JPEG, PNG, PSD, GIF, BMP?

Re: Very slow process PDF -> JPEG:

Posted: 2011-11-02T02:08:10-07:00
by YouPict.Ru
I found a normal solution is to make a quick preview of PDF
Need to request a single layer of PDF: name.pdf[0]

Code: Select all

use Image::Magick;         
$image = Image::Magick->new;
($width, $height, $size, $format) = $image->Ping("name.pdf[0]");
print "$width, $height, $size, $format \n";
...
...
...
P.S. for the administration:
I really like your software product.
I want to make a mirror on my server to download your software product.
As you look at it?