I have 2 sizes $w and $h being sent via a GET variable. Via a getimagesize method i'm getting the original size of a image. I want to then take down the image in size one pizel at a time till either the $w or $h are equal or smaller than the original.
list($width, $height) = getimagesize($filename);
$newheight = $height;
$newwidth = $width;
do {
$newwidth--;
$newheight--;
} while ($newwidth == $w Or $newheight == $h);
When I echo this out, I get my original size, my new max size and then the original less one pixel meaning it's looped only once. Why?