projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b386ff
)
preserve the image type
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Sat, 23 Oct 2010 14:37:38 +0000
(10:37 -0400)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Mon, 25 Oct 2010 13:29:22 +0000
(09:29 -0400)
horde/services/images/view.php
patch
|
blob
|
history
diff --git
a/horde/services/images/view.php
b/horde/services/images/view.php
index
8f61532
..
2bdb781
100644
(file)
--- a/
horde/services/images/view.php
+++ b/
horde/services/images/view.php
@@
-74,9
+74,11
@@
if (!empty($conf['image']['convert'])) {
$context['convert'] = $conf['image']['convert'];
$context['identify'] = $conf['image']['identify'];
}
-$image = Horde_Image::factory($driver, array('context' => $context));
+$type = Horde_Mime_Magic::analyzeData($file_data);
+$image = Horde_Image::factory($driver,
+ array('context' => $context));
$image->loadString($file_data);
-
+$image->setType($type);
/* Check if no editing action required and send the image to browser. */
if (empty($action)) {
$image->display();