Open Marduksen opened 1 year ago
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.
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.
thanks for that
@Marduksen I should have asked, did either of those bits of info help?
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):
<?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();