diff options
author | lisps <stummp@loewen.de> | 2013-11-27 09:38:06 +0100 |
---|---|---|
committer | lisps <stummp@loewen.de> | 2013-11-27 09:38:06 +0100 |
commit | 77450f4001bc641f7a724ae5e5c2f71b44c022d1 (patch) | |
tree | 4ab3e24204ffaa92bebd343bd9a70ce5121bbc67 /inc/media.php | |
parent | 14b3007921f7b66fc9e3621b861a3c83e7e9093c (diff) | |
download | rpg-77450f4001bc641f7a724ae5e5c2f71b44c022d1.tar.gz rpg-77450f4001bc641f7a724ae5e5c2f71b44c022d1.tar.bz2 |
media image can be resized by height (without width)
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 d69426414..390cd3488 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1800,6 +1800,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; |