Welcome Guest, Not a member yet? Register   Sign In
Gallery problem - generating diferent size pictures from one?
#1

[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.
#2

[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.
#3

[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?
#4

[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.
#5

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

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

[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.




Theme © iAndrew 2016 - Forum software by © MyBB