From 57f3c11d6ced03a5c1e149107f995a92944a9b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Grandt?= Date: Tue, 3 Nov 2015 12:32:44 +0100 Subject: [PATCH] Don't resize SVG's (pending addition to better deal with them?) --- src/PHPePub/Core/EPub.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PHPePub/Core/EPub.php b/src/PHPePub/Core/EPub.php index 71994e4..5f43e90 100644 --- a/src/PHPePub/Core/EPub.php +++ b/src/PHPePub/Core/EPub.php @@ -619,11 +619,12 @@ function getImage($source) { // SVG image. $xml = simplexml_load_string($image); $attr = $xml->attributes(); - $width = $attr->width; - $height = $attr->height; $mime = "image/svg+xml"; $ext = "svg"; + /* + $width = $attr->width; + $height = $attr->height; $ratio = $this->getImageScale($width, $height); if ($ratio < 1) { @@ -631,6 +632,7 @@ function getImage($source) { $attr->height = $height * $ratio; } $image = $xml->asXML(); + */ } else { $imageFile = imagecreatefromstring($image); if ($imageFile !== false) {