V
V
Vadim2017-03-26 16:04:59
PHP
Vadim, 2017-03-26 16:04:59

Why is Imagick coloring an image the wrong color, and how can I overcome this?

The simplest code:

$image = new Imagick();
$image->newImage(500, 500, new ImagickPixel('#fff000'));
$image->setImageFormat('png');
header('Content-type: image/png');
echo $image;

And a square should be drawn with the color #fff000 . But for some reason, the color of the displayed square is #fff100 , i.e. channel g from f0 becomes f1 . What is this nonsense? Why and how to overcome?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question