Page 1 of 1

is this possible??? resize an image in a directory

Posted: Fri May 05, 2006 3:30 pm
by Maluendaster
for example, all uploaded images will be in the directory /thumbs/ , but i want a script that resize all images in that directory without passing through a file.

don't know if you understand me.

Posted: Fri May 05, 2006 3:33 pm
by Burrito
not sure what you mean by "without passing through a file".

But you can resize an image with GD. Take a look at Onion's resize class to make it easier for you.

Posted: Fri May 05, 2006 3:33 pm
by alex.barylski
Not sure I understand you...

Yes, you can resize images on the fly (dynamically) or make a copy, resize them at upload and store thumbnails in a thumb directory...

Not sure what you mean by pass through a file though???

Posted: Fri May 05, 2006 3:49 pm
by s.dot
psuedo comment code

Code: Select all

//  define a thumbnailing function for resizing

//  open your directory

//  loop through it

        // apply thumbnailing function to the image while looping, making sure it saves over top of your current image

//  done