didnt work for me that wayi had to put $wh = imageResize(...)and then print_r($wh);// in the same img tagthen it worked !!!

system
—
2004-09-15T13:52:29Z —
#3

This is cheating, any idiot can modify the IMG tag width and height attributes. What I was looking for was a PHP script that would actually generate a new image at the requested resolution. Though to be fair you do say this at the bottom. Unfortunately this article came up as the first hit on my google search

system
—
2004-09-30T01:56:31Z —
#4

This article was very helpfull for me!

I am not an expert in PHP so this was really the article that i was looking for.

Thank you to Greg Knox

chrismo
—
2004-10-18T13:54:09Z —
#5

Maybe I'm also going to use the 'getimagesize' function - but what I would like is that it only shows the 10 newest images from a folder - is this possible? Or that it shows randomly 10 pictures out of a folder... Appreciate any hints.

craig34
—
2004-10-20T16:01:10Z —
#6

A big problem here is that you are loading the entre image, and incurring the bandwidth for it as well, when you could just be loading a thumbnail image that is a fraction of the size. Why load an 80kb image when you only need to load a 5kb image?

system
—
2004-12-19T07:33:38Z —
#7

This is for craig34 YOu are correct however if the image is a hyperlinked thumbnail of the original and you have over 3000 images it is great. Having to resize all images (which takes up server space) and have it load two images...This is beter.

Thank you Greg Knox

The function can be rewritten for nonpercent values and different value for width and height

system
—
2005-02-01T12:37:25Z —
#8

What you can do instead of using up bandwidth is have php resize the image before downloading it eg:<?php// File and new size$filename = 'test.jpg';$percent = 0.5;

I tried the above article out, but found that it was not working that well for me. I've included an updated script that works really well for me. By the way, forgive me by the messiness of the code - I was in a rush!

Can you explain how you would use this if you were grabbing the images from the images folder and then printing them into a results table?

system
—
2005-09-26T00:15:25Z —
#16

show us how to resize the image and make it a smaller file size, ya bum!

system
—
2005-11-28T09:32:57Z —
#17

Thanks so much for this! I was looking for ages for a soltion to my problem (how to resize images on the fly to use as thumbnails).

system
—
2005-11-30T10:53:31Z —
#18

Great

just what i was looking for

system
—
2005-12-20T02:52:04Z —
#19

Haha. To resize the image and make it a smaller filesize, use a free program like "Irfanview". You can choose to resample the image for better quality, and compress the image at varying percentages to achieve truly miniscule filesizes!

This article was amazing, thanks! =D

system
—
2005-12-21T09:08:41Z —
#20

This isn't code I want to find, it work but it's size is same when i get thumbnail