]> source.dussan.org Git - nextcloud-server.git/commitdiff
make svg preview backend work with encryption
authorGeorg Ehrke <georg@ownCloud.com>
Mon, 27 May 2013 09:09:55 +0000 (11:09 +0200)
committerGeorg Ehrke <georg@ownCloud.com>
Mon, 27 May 2013 09:09:55 +0000 (11:09 +0200)
lib/preview/svg.php

index 12b93f696ea9452e102b118a03e19992933cc7e1..8f4697dce042f2a24c6361905d36058e846b7edf 100644 (file)
@@ -13,7 +13,8 @@ class OC_Preview_SVG extends OC_Preview_Provider{
 
        public function getThumbnail($path,$maxX,$maxY,$scalingup,$fileview) {
                $svg = new Imagick();
-               $svg->readImageBlob($fileview->file_get_contents($path));
+               $svg->setResolution($maxX, $maxY);
+               $svg->readImageBlob('<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $fileview->file_get_contents($path));
                $svg->setImageFormat('jpg');
 
                //new image object