Welcome to WebmasterWorld Guest from 54.144.206.73

Forum Moderators: coopster & jatar k

Using PHP to create thumbnails of jpg on upload

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

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

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

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



2 functions in particular I am looking at are

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

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

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

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

10+ Year Member



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 ;)
1:11 am on Jan 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>>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?

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

10+ Year Member



>>>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...]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month