Very slow process PDF -> JPEG:

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
YouPict.Ru
Posts: 9
Joined: 2011-10-26T20:42:14-07:00
Authentication code: 8675308

Very slow process PDF -> JPEG:

Post by YouPict.Ru » 2011-10-31T23:32:36-07:00

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?

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Very slow process PDF -> JPEG:

Post by anthony » 2011-11-01T19:49:11-07:00

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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

YouPict.Ru
Posts: 9
Joined: 2011-10-26T20:42:14-07:00
Authentication code: 8675308

Re: Very slow process PDF -> JPEG:

Post by YouPict.Ru » 2011-11-01T22:54:41-07:00

Ping that is normally only handles JPEG, PNG, PSD, GIF, BMP?

YouPict.Ru
Posts: 9
Joined: 2011-10-26T20:42:14-07:00
Authentication code: 8675308

Re: Very slow process PDF -> JPEG:

Post by YouPict.Ru » 2011-11-02T02:08:10-07:00

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?

Post Reply