CodeIgniter Forums
Gallery problem - generating diferent size pictures from one? - 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: Gallery problem - generating diferent size pictures from one? (/showthread.php?tid=1933)



Gallery problem - generating diferent size pictures from one? - El Forum - 07-05-2007

[eluser]flash_back[/eluser]
I am making gallery for my tuning portal and I need some help.

Idea is that every register user can build and maintain there own gallery. Gallery is based on three levels and four album container. It's look something like this [mark -> model -> album > album content] or [BMW -> E30 - 318i ->photos].

So problem is that I need to generate from one uploaded photo 3 deferent size [thumb, medium and full size]. My idea is to build some function($photo_id) that will temporarily generate photo from original. Basically idea is to have just one original photo on server, and from that one just generating others.

can anybody help me whit some idea how to start that function? or some example will be nice too.


Gallery problem - generating diferent size pictures from one? - El Forum - 07-05-2007

[eluser]Lick[/eluser]
I don't think generating thumbnails in real-time is a good idea. It could be really slow, especially when you're displaying a page with multiple thumbnails that each have to be generated.

I would rather cache the thumbnails and medium-size images.


Gallery problem - generating diferent size pictures from one? - El Forum - 07-05-2007

[eluser]flash_back[/eluser]
Tnx for fast reply!

But how do you mean caching images? Like making new one from the original photo (whit deferent size) or something else?


Gallery problem - generating diferent size pictures from one? - El Forum - 07-05-2007

[eluser]ztinger[/eluser]
[quote author="flash_back" date="1183716605"]Tnx for fast reply!

But how do you mean caching images? Like making new one from the original photo (whit deferent size) or something else?[/quote]

Of course. Well, 'caching' isn't exactly the term here. But creating the thumbs when uploading the pics.


Gallery problem - generating diferent size pictures from one? - El Forum - 07-06-2007

[eluser]emperius[/eluser]
I'm using phpThumb


Gallery problem - generating diferent size pictures from one? - El Forum - 07-06-2007

[eluser]flash_back[/eluser]
I will try it! TNX Smile


Gallery problem - generating diferent size pictures from one? - El Forum - 07-06-2007

[eluser]batteries[/eluser]
just make the thumbs or whatever images, and store them along with the originals(if you're keeping the originals).

the way i see it is; storage is cheap, bandwidth and CPU are expensive.