Problem with Image Magick thumbnaill background colour
<?php
//Note that the function returns an Imagick object and does not modify the existing object. Below is my code for converting a PNG with transparency into a JPG with a background color. This code illustrates the difference.
$im = new Imagick('image.png');
$im->setImageBackgroundColor('white');
$im->flattenImages(); // This does not do anything.
$im = $im->flattenImages(); // Use this instead.
$im->setImageFormat('jpg');
$im->writeImage('image.jpg');
?>
permalink -
-
http://www.sitepoint.com/forums/showthread.php?805131-Problem-with-Image-Magick-thumbnaill-background-colour