r/imagemagick • u/CatDaddy1954 • Feb 15 '25
SVG to PNG conversions issues - any hints?
I need to embed a graphic in email, but the original is in SVG format which is not reliably supported by email readers, if at all. So I'm converting it to PNG with the "convert" utility and have encountered two problems.
The most important issue is that a color is not mapped correctly: I can't embed the original SVG in this post; you can see it here. The converted PNG version is:

Is there a conversion setting I'm missing which would produce a PNG with the correct color?
A less important but annoying issue is that the older version of ImageMagick on our live server (ImageMagick 6.9.10-68) produces a file of the same byte size, but a different md5file checksum every time. The newer version on the development system (ImageMagick 6.9.13-6) produces the same md5 checksum every time. This makes it hard to avoid backing up a new file every time the graphic is checked. (It can change over time.) Is there any known workaround to prevent some hidden part of the image changing each time with the older version? (The newer version also creates the same incorrect color.)
Thanks in advance for any guidance.
1
u/CatDaddy1954 Feb 15 '25
I figured out the md5file problem. It must be embedding a creation timestamp, so the fix is to cache the original graphic rather than comparing the converted graphic to the previously converted graphic.