PHP 8.5.0 Beta 1 available for testing

Voting

: four minus two?
(Example: nine)

The Note You're Voting On

linspb at gmail dot com
8 years ago
At PHP 7.x before

$im->posterizeimage(2, FALSE);

do

$im->setImageType(imagick::IMGTYPE_COLORSEPARATION);

on PHP 5.x working without setImageType well.

Example:
$im = new Imagick();
$r = $im->readImageBlob($label);
if (!$r) {
return FALSE;
}
$im->setImageType(imagick::IMGTYPE_COLORSEPARATION);
$im->posterizeimage(2, 0);
$bmp = $im->getImageBlob();

<< Back to user notes page

To Top