Last active
September 28, 2020 05:04
-
-
Save alinmigea/f7ea322237c9d0c1a4e3a670c84621e4 to your computer and use it in GitHub Desktop.
PHP: Use Imagick to convert SVG chart to PNG
This file contains 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
Commands for installing the server library: | |
sudo apt-get install php7.0-imagick | |
sudo apt-get update | |
sudo service apache2 restart | |
Errors: | |
Caught exception: no decode delegate for this image format `' @ error/blob.c/BlobToImage/ | |
use the following, because it might be that you don't have the MIME tyep SVG installed: | |
sudo apt-get install libgraphicsmagick1-dev libmagickcore-dev libmagickcore-6.q16-2 libmagickcore-6.q16-2-extra | |
identify -list format | grep SVG | |
Output: MSVG SVG rw+ ImageMagick's own SVG internal renderer | |
Usefull links: | |
https://stackoverflow.com/questions/13125352/readimageblob-fatal-error-when-converting-svg-into-png/15614469#15614469 | |
https://github.com/gographics/imagick/issues/97 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment