Skip to content

Instantly share code, notes, and snippets.

@mkoppanen
Created Oct 16, 2013
Embed
What would you like to do?
<?php
$im = new Imagick ('test.png');
$im->setImageBackgroundColor ('skyblue');
// This works with latest Imagick master
// $im->setImageAlphaChannel (Imagick::ALPHACHANNEL_REMOVE);
// This is the same constant value as above
$im->setImageAlphaChannel (Imagick::ALPHACHANNEL_TRANSPARENT + 2);
$im->writeImage ('test_skyblue_alpha.png');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment