Skip to content

Commit

Permalink
Don't resize SVG's (pending addition to better deal with them?)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grandt committed Nov 3, 2015
1 parent e71e389 commit 57f3c11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/PHPePub/Core/EPub.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,18 +619,20 @@ 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) {
$attr->width = $width * $ratio;
$attr->height = $height * $ratio;
}
$image = $xml->asXML();
*/
} else {
$imageFile = imagecreatefromstring($image);
if ($imageFile !== false) {
Expand Down

0 comments on commit 57f3c11

Please sign in to comment.