CodeIgniter Forums
Image Manipulation Help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Image Manipulation Help (/showthread.php?tid=27658)



Image Manipulation Help - El Forum - 02-17-2010

[eluser]Craig300[/eluser]
Hi All,

I am trying to pull a path to an image from a database and resize said image to display on to the page. I have looked at the gd2 library but it seems that you can only save a copy to your server and use it from there instead of creating it 'on the fly'.

Has anyone got any ideas/opinions on this topic?

Cheers,

Craig


Image Manipulation Help - El Forum - 02-17-2010

[eluser]JoostV[/eluser]
Generating images on the fly is generally a bad idea. It is a complete memory hog.

A 'better' way is to resize images on upload. If you need multiple sizes, store multiple versions. Check out the image library in my signature, if you want.


Image Manipulation Help - El Forum - 02-17-2010

[eluser]Craig300[/eluser]
I had done that in a previous project but was just wondering if there was any way of generating them on the fly in order to avoid saving another image on the server, however small it may be.

Thanks for your advice.