homepage Welcome to WebmasterWorld Guest from 54.204.64.152
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Using PHP to create thumbnails of jpg on upload
jatar_k




msg:1287918
 6:49 pm on Jan 19, 2003 (gmt 0)

Anyone done this? I was just looking around and seeing how it may be done and figured someone might have an idea.

I am looking at image functions as well as GD.

 

jatar_k




msg:1287919
 6:56 pm on Jan 19, 2003 (gmt 0)

2 functions in particular I am looking at are

[php.net...]
and
[php.net...]

brotherhood of LAN




msg:1287920
 6:57 pm on Jan 19, 2003 (gmt 0)

I have one here in a zip called "upnreload3.0", it creates thumbnails and puts them in one directory and optionally to resize the first image and put it in another folder.

Although I've not used it much the script does it very well ;) I have not managed to get time to play around with it and alter it to my liking

If you are looking for a pre-made script just for testers then you might want to look at something like this.

cant remember the site where i got it from, but i did find it through hotscrips

eaden




msg:1287921
 11:47 pm on Jan 19, 2003 (gmt 0)

I use imagemagick ( .org ) to make thumbs, It' requires you use exec("/usr/bin/convert".$yourargs) to make the thumbs, and that it is installed on the server, but it creates very good quality thumbs. It is also extremely versatile, and can do what photohop can do ( within reason, e.g. resizing, croping, rotation, adjusting color, etc ), all from the commandline. It's open source too ;)

toolman




msg:1287922
 1:11 am on Jan 20, 2003 (gmt 0)

>>>GD

When you say "resize" does this include reducing the filesize or is it merely reducing dimesion?

>>>>imagemagick

Is there a gui for using im on the server like a graphics program?

eaden




msg:1287923
 12:46 pm on Jan 21, 2003 (gmt 0)

>>>GD

> When you say "resize" does this include reducing the filesize or is it merely reducing dimesion?

both. Imagemagick is a collection of programs, the one i use the most is convert.

it can convert from say gif to jpg, change the size ( in dimentions ) and you can set a quality setting if the output is jpeg.

When I'm talking about quality, i'm not talking about jpg "quality" but the quality of the resize (resampling) algorithum. I have seen sites that use GD and their thumbnails are all rough and low quality, wheres covert resizes an image as photoshop does, buy resampling useing complicated algos.

>>>>imagemagick

>Is there a gui for using im on the server like a graphics program?

it's a UNIX program, that will run on unix servers. There is a gui for it, but i'm not sure how you're supposed to control a GUI from a php script ;)

ok i found a site that compates the quality between GD and netPBM ( although not imagemagick, imagemagick is as good as if not better than netPBM )
[vddh.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved