Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I would like to overlay an SVG image on top of a raster image so that the SVG image's width is 20% of the raster image's width and is placed 10% in from the bottom left edge of the image.
I've tried the following command, but it doesn't seem to affect the size or offset of the SVG at all, plus the SVG is rendered with a white background rather than being transparent:
I realise I can get the end result I'm looking for by using a PNG and pixel values for the geometry, but ideally I'd like to get the more flexible solution using an SVG working.
I am not sure that -geometry using % values. If it does then you still need the + sign. If it does not, then you need to convert the % values to pixels. see http://www.imagemagick.org/script/comma ... p#geometry in the section about offsets. It looks like it does not support %.
Also you should use the convert syntax and set the density on the svg file before reading it to set the size of the converted svg file.
The converted SVG image has no transparency because, by defalt, IM puts it on an opaque white background. Defeat this by putting "-background none" before the SVG file. The only transparency occurs in the top corners.
You might choose a different "-compose" operation. Perhaps "-compose Multiply" gives what you want.
Thanks for the suggestions, after adding -background none I was still having an issue with opacity of the SVG shape being 100% rather than the 50% set in the SVG. I did some searching and found that rather than setting opacity on the <g> containing the shape path, fill-opacity="0.5" should be set on the path that makes up the shape. All working how I wanted now.