Humani Power wrote:
Hey hi!!.
I have a few pages that uploads images to the apache server and makes a
registry on a mysql database. Everything is going well just for a few
details.
When I make the upload for an image, it creates me a thumb image, but
not as
I want. For example, if I have an image that its of 2000 x 2000 px, the
thumb created is 200 x 200, If I upload another with 300x300 px, my thumb
will be 30x30 px, making look the gallery pretty bad. The only thing
that I
need is that all my thumbs were on the same size.
I've tried to modify the thumb width and height size, but doesnt work..
Probably I am not undersatnding hoy to use the resampling() tool.
Shockingly, the following lines which multiply the image width and
height by 0.1 to create the thumb width and height mean that your thumb
is always 10% of the size of the image.
$thumb_width=$width*0.10;
$thumb_height=$height*.10;
Make these real numbers (taking account of aspect ratio), and you'll get
what you're after. There are lots of tutorials out there explaining how
to create thumbnails from images using GD, I suggest you Google for one.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php