Simple Image rotation with transparent background
Posted: 2009-09-10T23:33:34-07:00
Hi everyone,
I am trying to something quite simple really, rotation with a transparent background. I have tried a lot of things but I keep getting a black background after the rotation
Before:
After:
If you have any idea, please let me know!
I am trying to something quite simple really, rotation with a transparent background. I have tried a lot of things but I keep getting a black background after the rotation
Code: Select all
$img = new Imagick('file.png');
$img->setBackgroundColor(new ImagickPixel("transparent"));
$img->rotateImage(new ImagickPixel('transparent'), 45);
$img->save('fileRotate.png');