Welcome Guest, Not a member yet? Register   Sign In
imag_lib, imagemagick, and PDF thumbnails
#1

[eluser]billmce[/eluser]
I need to generate some PDF thumbnails in gif format (no option -- it must be gif).
I'd like to do it within CI's imag_lib ... that means setting
Code:
$config['image_library'] = 'imagemagick';
as, to the best of my knowledge, imagemagick is the only option for dealing with PDFs.

I have noticed that if the PDF has multiple pages the output is an animated gif.

Since imagemagicks 'convert' program allows you to specify a single PDF page I would think that the same would be possible using CI's imag_lib use of imagemagick.

So, in imagemagick one can do
Code:
convert input.pdf[0] page3.gif
to create a gif of the first page.

I've tried doing the following in CI with the imag_lib.
Code:
$config['source_image'] = $my_PDF . '[0]';
I've had no success.

Can the imagemagick library on CI use the page selection abilities of imagemagicks 'convert'?

Failing that ... can I pass some options to the library (-delay 600) to slow down the animation?

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB