Skip to content

Instantly share code, notes, and snippets.

@h4ck3rm1k3
Last active March 4, 2018 15:36
Show Gist options
  • Save h4ck3rm1k3/643b1b735d8ca052170682d7bbaf6c22 to your computer and use it in GitHub Desktop.
Save h4ck3rm1k3/643b1b735d8ca052170682d7bbaf6c22 to your computer and use it in GitHub Desktop.
helloImagick Object
(
)
PHP Fatal error: Uncaught ImagickException: no decode delegate for this image format `' @ error/blob.c/BlobToImage/353 in /home/mdupont/experiments/imagemagick/test.php:15
Stack trace:
#0 /home/mdupont/experiments/imagemagick/test.php(15): Imagick->readimageblob('test.svg')
#1 {main}
thrown in /home/mdupont/experiments/imagemagick/test.php on line 15
<?php
printf("hello");
$im = new Imagick;
$pixel = new ImagickPixel( 'transparent' );
# $imagick->setFormat($format);
#$imagick->setCompression($compression);
#$imagick->setCompressionQuality($quality);
#$im->setImageFormat( $imageType );
#$im->resizeImage( $im->getImageWidth(), $im->getImageHeight(), \Imagick::FILTER_LANCZOS, 1 );
print_r($im);
$im->setBackgroundColor( $pixel );
$im->readImageBlob( "test.svg" );
$im->setImageFormat( 'png32' );
$im->resizeImage( 1200, 1200, \Imagick::FILTER_LANCZOS, 1 );
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment