Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color bug in newest version #632

Open
Marduksen opened this issue Oct 3, 2023 · 3 comments
Open

Color bug in newest version #632

Marduksen opened this issue Oct 3, 2023 · 3 comments

Comments

@Marduksen
Copy link

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

@Danack
Copy link
Collaborator

Danack commented Oct 3, 2023

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.

@Marduksen
Copy link
Author

thanks for that

@Danack
Copy link
Collaborator

Danack commented Nov 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants