Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] CI 3.1.0 ImageMagick not working
#10

GD2 has no support for SVG images, so you indeed need to use ImageMagik. You can try using the function below instead of the exec() approach.

PHP Code:
function svg2png($originalFile$outputFile$width=800$height=600) {
 
   $image = new \Imagick(realpath($originalFile));
 
   $image->setImageFormat("png24");
 
   $image->resizeImage($width$heightimagick::FILTER_LANCZOS1); 
 
   $image->writeImage($outputFile);    

Reply


Messages In This Thread
RE: [SOLVED] CI 3.1.0 ImageMagick not working - by Diederik - 08-25-2016, 12:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB