Don't upscale the images larger than the original.
This commit is contained in:
parent
e0ba6fbc02
commit
f90077154f
|
@ -40,6 +40,7 @@
|
||||||
$h = $size[1];
|
$h = $size[1];
|
||||||
//set new size
|
//set new size
|
||||||
$nw = $_GET["width"];
|
$nw = $_GET["width"];
|
||||||
|
if ($nw > $w) { break; }
|
||||||
$nh = ($nw*$h)/$w;
|
$nh = ($nw*$h)/$w;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -65,6 +66,7 @@
|
||||||
$h = $size[1];
|
$h = $size[1];
|
||||||
//set new size
|
//set new size
|
||||||
$nh = $_GET["height"];
|
$nh = $_GET["height"];
|
||||||
|
if ($nh > $h) { break; }
|
||||||
$nw = ($nh*$w)/$h;
|
$nw = ($nh*$w)/$h;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in a new issue