Saturday 26 March 2016

Remove specific color/white/Black from any type of image

//header('Content-type: image/png');
$strInputFile = '20160312105210_girls.jpg';
$target = 'car_transparent.png';
$im = new Imagick($strInputFile);
//$im->paintTransparentImage($im->getImageBackgroundColor(), 0, 10000);
$im->paintTransparentImage('#000', 0, 10000); //Which color you need to remove #000
$im->setImageFormat('png');
//$im->writeImage($target);
$im->destroy();
//echo $im;

No comments:

Post a Comment