Page 1 of 1

thumb nail and gd2 issue?

Posted: Fri Apr 14, 2006 11:53 am
by rami
i have a photo galery in which currently i am uploading a thumbnail and larger version of the same photo separately to a folder...
i am displaying thumbnail and linking to big picture...

i came across a small code phpThumb function which is very easy to use..but it uses gd2.dll

i am new to php so
if i use that funcion i am able to make thumbnail of a single picture..but before using it in real web(i have tested in localhost) ,i have some ?s
1)what actually is gd2...it says extension..in localhost i edited php main file to activate it but in real web where and how should i activate it...does web host provide it in default?
does thumbnailing in this way effect in image downloading time?
2)what are disadvantage in using gd2?does it cause any overloads..problems?
3)should i go for gd2 option or continue uploading two file(one thumb nail and bigger one of it)
4)is there any better way to make thumbnail of uploaded image..any other...?

thanks


notes

Code: Select all

Call phpThumb() just like you would a normal image.      //
// Example: <IMG SRC="phpThumb.php?src=/image.jpg&w=100">   //
// (see http://www.silisoftware.com for more usage examples)       //
//                                                          //
// Parameters:                                              //
//   w  = max width of output thumbnail in pixels           //
//   h  = max height of output thumbnail in pixels          //
//   f  = output image format ('jpeg', 'png', or 'gif')     //
//   q  = JPEG compression (1=worst, 99=best, 75=default)   //
//   sx = left side of source rectangle (default = 0)       //
//   sy = top side of source rectangle (default = 0)        //
//   sw = width of source rectangle (default = fullwidth)   //
//   sh = height of source rectangle (default = fullheight)

Re: thumb nail and gd2 issue?

Posted: Fri Apr 14, 2006 12:47 pm
by feyd
rami wrote:1)what actually is gd2...it says extension..in localhost i edited php main file to activate it but in real web where and how should i activate it...does web host provide it in default?
It is an extension, like many others. It's functions are not native to PHP, but it is often loaded by hosts with their default set ups.
rami wrote:does thumbnailing in this way effect in image downloading time?
Always creating a thumbnail will affect it.
rami wrote:2)what are disadvantage in using gd2?does it cause any overloads..problems?
That would depend on what you consider a disadvantage. It does not support a great number of image formats, but it does offer image manipulation above some other image handling functionality out there. It is included with PHP, so you don't have to rely on hosts to have certain external applications available as much.
rami wrote:3)should i go for gd2 option or continue uploading two file(one thumb nail and bigger one of it)
That is your choice.
rami wrote:4)is there any better way to make thumbnail of uploaded image..any other...?
Doing it yourself offers the most control, but takes the most time and effort. It is your choice.

Posted: Fri Apr 14, 2006 12:51 pm
by rami
really thanks
soory but i must say that may be it must sensible reply for ? up to now
(please dont take it other way)
thanks for help
then i have decided that i will use gd2 for now
thanks for help once again..