projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
679ff0f
)
Only resize thumbnail if it is too large
author
Michael M Slusarz
<slusarz@curecanti.org>
Tue, 7 Jul 2009 17:59:52 +0000
(11:59 -0600)
committer
Michael M Slusarz
<slusarz@curecanti.org>
Tue, 7 Jul 2009 19:47:33 +0000
(13:47 -0600)
imp/lib/Mime/Viewer/Images.php
patch
|
blob
|
history
diff --git
a/imp/lib/Mime/Viewer/Images.php
b/imp/lib/Mime/Viewer/Images.php
index
9dc6b07
..
f330e66
100644
(file)
--- a/
imp/lib/Mime/Viewer/Images.php
+++ b/
imp/lib/Mime/Viewer/Images.php
@@
-218,7
+218,10
@@
EOD;
if ($img) {
if ($thumb) {
- $img->resize(96, 96, true);
+ $dim = $img->getDimensions();
+ if (($dim['height'] > 96) || ($dim['width'] > 96)) {
+ $img->resize(96, 96, true);
+ }
}
$type = $img->getContentType();
$data = $img->raw(true);