imagick icon indicating copy to clipboard operation
imagick copied to clipboard

Color bug in newest version

Open Marduksen opened this issue 1 year ago • 3 comments

After my host updated to one of the newest versions, the colors suddently. They have looked a bit into it and write the following: "The nature of the problem is simply an error in the interaction between Imagick (the PHP extension) and ImageMagick (the software library). In concrete terms, it seems to be the color management when converting from SVG, and with the red and green channels."

Left is how it looks now & Right red box, is how it should look (php example below the image): imagick

<?php $svg = '<svg width="200" height="200" viewBox="0 0 200 200"> <rect x="0" y="0" width="100" height="100" fill="#FF0000" /> </svg>'; $im = new Imagick(); $im->setResolution(96, 96); $im->setBackgroundColor(new ImagickPixel("transparent")); $im->readImageBlob($svg); $im->setImageFormat('png'); header("Content-Type: image/png"); echo $im->getImageBlob();

image

Marduksen avatar Oct 03 '23 18:10 Marduksen

You should try reproducing the error using the command line ImageMagick tools. If the error still occurs you should report it upstream at https://github.com/ImageMagick/ImageMagick6

If you can't reproduce on the command line ImageMagick tools, you should probably ask your host to always upgrade Imagick and ImageMagick together.

Screenshot 2023-10-03 at 19 32 41

Some of the identifiers change values in patch versions, and it is really not guaranteed that Imagick compiled against one version of ImageMagick is going to work with a different version of ImageMagick.

Danack avatar Oct 03 '23 18:10 Danack

thanks for that

Marduksen avatar Oct 03 '23 20:10 Marduksen

@Marduksen I should have asked, did either of those bits of info help?

Danack avatar Nov 12 '23 22:11 Danack