Forum Moderators: not2easy

Message Too Old, No Replies

Automated Graphic Resizer

Is it possible?

         

wfernley

7:43 pm on May 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a website where users upload images. I was curious if there was a way I could create a script that automatically resizes those images so they don't like stretched or crunched because the user uploaded a graphic with incorrect dimensions.

Is it possible?

Wes

4hero

7:42 pm on May 24, 2006 (gmt 0)

10+ Year Member



hi Wes,

This is possible, I have used php in the past to do this myself. Search google for "php thumbnail generator" and you may get some ideas from the first result.

jatar_k

7:44 pm on May 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if you wanted to go a php route we have a post in the PHP library [webmasterworld.com]

Image upload and Thumbnail Generator [webmasterworld.com] msg 29 & 30

you would probably have to mess wiht ratios and things but the basic functionality works very well

wfernley

7:54 pm on May 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Great! Thanks for the posts.

What about image size. If they provide a 800x600 high detailed image that is 300kb in size, will the thumbnail also be 300kb in size?

jatar_k

7:54 pm on May 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



that can all be set in the functions

odds are the thumb will always be much smaller in size (kb)

4hero

9:26 pm on May 24, 2006 (gmt 0)

10+ Year Member



the method I use resizes them in filesize too, but it does seem to slow the page load time drastically (which I'm looking into)...