From: Michael J. Rubinsky Date: Sat, 23 Oct 2010 14:37:38 +0000 (-0400) Subject: preserve the image type X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8e4f6bdbd70a41e4424249025cfcdf62bab0f7f4;p=horde.git preserve the image type --- diff --git a/horde/services/images/view.php b/horde/services/images/view.php index 8f61532aa..2bdb78109 100644 --- 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();