dynamic image resizing?

Soldato
Joined
19 Oct 2002
Posts
3,480
hi guys...

i'm doing a site which requires lots of product images, but for the ease of the user and the cms, i am only using one image per product...

therefore, the images need to be downscaled for the thumbnails. The html way of doing it with width="" height="" works just fine in safari but looks like an absolute dog in IE, and i've tried a few php scrips which were a bit better but not much...

could anyone recommend a professionally viable method of doing this? or do i simply have to create separate thumbnail images?
 
Do seperate thumbnails. Otherwise if it's a large image it'll take ages to load.... obvious really. There is loads of programs out there that will batch create thumbnails though.
 
Do seperate thumbnails. Otherwise if it's a large image it'll take ages to load.... obvious really. There is loads of programs out there that will batch create thumbnails though.
i'm not fussed at all about the batch... photoshop can do a fine job of it... the ease of use of one image is for the guys who will be maintaining the site and who will simply want to load an image in with no fuss...

completely understand what you're saying though and would normally fully agree, but in this case its part of the agreed interface...
 
you could do an upload form in php that creates a thumb as it's uploaded? or if you're doing loads of images via ftp, maybe run a script that goes through the folder, check if a thumb exists and if it doesn't, create it?
 
I do it as a dynmically generated image using PHP GD, but tie it in with an image cache, so basically you reference the image like <img src="image.php?src=path-to- image&width=x&height=y"/> then image.php looks to see if its already generated that image . If it hasnt it generates it and saves it in a cache folder and if it has it just pulls it from the cache folder. Its usefull for ecommerce sites as the client can just upload an image direct from camera and then you can resize to whatever you want, and if your design changes you can just change the parameters in the script.

eg: http://www.blushbaby.co.uk/index.php/brand/listall

Click on one of the images and you can see the images as thumbnails, then click on one to see the full size etc.

You can then build more stuff into the script parameters, eg fixing the ratio, cropping etc
 
i've tried the GD library method but php just doesn't seem to be able to output at decent quality... after some investigating, it seems that the best way to get dynamic resizes is something called Image Magick... its what a lot of these ready-to-go galleries use for the thumbnail generation and the like...

http://www.imagemagick.com/

however... i can't for the life of me get my head around what is involved in implementing this and the site doesn't make a whole heap of sense to me... does anyone know what the crack is with this thing?
 
Back
Top Bottom