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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

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

Post 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.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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???
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply