diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-01-19 11:16:06 -0800 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-01-19 11:16:06 -0800 |
commit | 93c7482b06953931f70d639cec328e9c0d6613bc (patch) | |
tree | 1e7bab382512678c63378b77fb560cac5f96a4f7 /inc/media.php | |
parent | 0f569f4da813eb51aa75b3fe4a6e5c871b688eea (diff) | |
parent | e175e163722d806ebf45aa1e9a7843c2391a5b20 (diff) | |
download | rpg-93c7482b06953931f70d639cec328e9c0d6613bc.tar.gz rpg-93c7482b06953931f70d639cec328e9c0d6613bc.tar.bz2 |
Merge pull request #454 from lisps/resize_image-height
Resize image by height
Diffstat (limited to 'inc/media.php')
-rw-r--r-- | inc/media.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/media.php b/inc/media.php index 916be2796..cfe08f906 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1804,6 +1804,7 @@ function media_resize_image($file, $ext, $w, $h=0){ if($info == false) return $file; // that's no image - it's a spaceship! if(!$h) $h = round(($w * $info[1]) / $info[0]); + if(!$w) $w = round(($h * $info[0]) / $info[1]); // we wont scale up to infinity if($w > 2000 || $h > 2000) return $file; |