Created
January 2, 2017 17:36
-
-
Save cyberhobo/1845e68063224e5cee69298a11355401 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use JangoBrick\SVG\SVGImage; | |
$image = SVGImage::fromFile('test.svg'); | |
$image->getDocument()->setAttribute( 'viewBox', '20 20 200 200' ); | |
$rasterImage = $image->toRasterImage( 480, 480 ); | |
imagepng( $rasterImage, 'test.png' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment