Conversion from jpg to pdf, file gets bigger with PerlMagic

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
knuno

Conversion from jpg to pdf, file gets bigger with PerlMagic

Post by knuno »

I use montage to put together 3 jpg-files to one. The files are each about 300KB, and by using reasonable geometry the resulting jpg file is about 5-600KB. But I want a pdf-file so I do:

Code: Select all

$image = Image::Magick->new;

$image -> Read('16161722_1.JPG', '16161722_2.JPG', '16161722_3.JPG');

$doc = $image -> Montage(geometry=>'800', tile=>'1x3');

$doc -> Write('pres.pdf');

The problem is that the resulting pdf is about 4MB large! But if I let my program write the finished image as a jpg-file and then use a simple convert from bash:
convert pres.jpg pres.pdf
the resulting pdf file is only a few kilobytes larger than the jpg, about 600KB. Are there some options to Write that I'm missing or?

Knut
Post Reply