I am using imagemagick with rsvg-convert to convert svgs into jpegs. Everything works fine except when using gamma function to color correct images. It produces very different image than the one in browser.
Here is a preview of what the svg looks like in the browser.
This is the output of imagemagick+rsvg-convert after compiling the same svg
See how the details are blown out in the output image. Here is a link to download the actual svg with images
I tested it on windows as well as on ubuntu and centos using the same version below (see the picture for IM version).
Here are a couple commands i tried so far. Every command outputs the same blown out image.
- convert test.svg test.jpg
- Applied im evaluate function to single image - convert green_1186.jpg -evaluate pow 1 -evaluate multiply 1.54 -evaluate add 0 green_1186.c.jpg (produces blown out image)
- Applied gamma to the image - convert green_1186.jpg -gamma 1,1.54,0 green_1186.c.jpg
- convert green_1186.jpg -colorspace srgb -evaluate pow 1 -evaluate multiply 1.54 -evaluate add 0 green_1186.c.jpg
- convert green_1186.jpg -fx "1.54*(pow(u,1))+0" green_1186.c.jpg
- convert green_1186.jpg -auto-gamma -fx "1.54*(pow(u,1))+0" green_1186.c.jpg
I am not sure if the svg is wrong or i need to re-sample the values for IM or if the commands are wrong. I would really appreciate an expert thought on this matter.