CodeIgniter Forums
Regression: cannot convert a PDF to an image in 3.1.3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Regression: cannot convert a PDF to an image in 3.1.3 (/showthread.php?tid=67375)



Regression: cannot convert a PDF to an image in 3.1.3 - spjonez - 02-15-2017

This changed somewhere between 3.1.1 and 3.1.3: https://github.com/bcit-ci/CodeIgniter/blob/develop/system/libraries/Image_lib.php#L1652

The added condition prevents converting a PDF to an image. getimagesize will always return false in this case. I'm using Imagemagik as the library. If I comment the new block out it will correctly create an image as it did in past versions.


RE: Regression: cannot convert a PDF to an image in 3.1.3 - Narf - 02-15-2017

PDF is not an image format; you've been relying on a bug.


RE: Regression: cannot convert a PDF to an image in 3.1.3 - spjonez - 02-15-2017

Hah I figured you'd say that Smile

I extended the library and removed the check. Cheers,


RE: Regression: cannot convert a PDF to an image in 3.1.3 - InsiteFX - 02-15-2017

So instead of correcting the problem you extend the library and undo the check so that you can still use the bug.

Glad your not writing software for me.


RE: Regression: cannot convert a PDF to an image in 3.1.3 - spjonez - 02-15-2017

The alternative being, do not use CI's Image Library at all and write my own wrapper for IM. Not worth the effort IMO as this is only used to generate thumbnails.