imagick
imagick copied to clipboard
`ImagickPixel::clear()` is not working
Could you do me a favour and give some example PHP code that you expect to work?
Maybe something similar to the code in https://github.com/Imagick/imagick/blob/master/tests/269_ImagickPixel_setColorFromPixel_basic.phpt
Code:
<?php
// Create a new imagickPixel object
$imagickPixel = new ImagickPixel();
// Set the color
$imagickPixel->setColor('#38d9d3');
// Get the color
$color = $imagickPixel->getColor();
// Print the color
print("<pre>".print_r($color,true)."</pre>");
$imagickPixel->clear();
// Get the color
$color = $imagickPixel->getColor();
// Print the color
print("<pre>".print_r($color,true)."</pre>");
?>
Output:
Array
(
[r] => 56
[g] => 217
[b] => 211
[a] => 1
)
Array
(
[r] => 56
[g] => 217
[b] => 211
[a] => 1
)
Expected:
Array
(
[r] => 56
[g] => 217
[b] => 211
[a] => 1
)
Array
(
[r] => 0
[g] => 0
[b] => 0
[a] => 1
)