Page 1 of 1
Adding svg frame around image
Posted: 2011-08-23T13:41:15-07:00
by pasaliczaharije
Hi
I'm trying to compose two images - one is photo image, and other is svg vector frame which i need to add as frame.
Is there any smarter way other than converting svg to png which matches same dimension as photo image and then composing those two images together?
Best
Re: Adding svg frame around image
Posted: 2011-08-23T16:45:47-07:00
by anthony
Compositing the SVG over the raster image would probably be the best way of doing it. However I would suggest...
- you set -background None before reading in the SVG. to set transparency.
- make sure your imagemagick has RSVG handling rather than the internal MSVG
http://www.imagemagick.org/Usage/draw/#svg
- Look at 'framing' techniques. You may like to add a shadow to the SVG overlay before composition.
http://www.imagemagick.org/Usage/thumbn ... er_overlay
- If you plan to do this a lot to many images that are the same size you may like to look at saving a prepared overlay and some form of looping method.
Re: Adding svg frame around image
Posted: 2011-08-23T18:28:14-07:00
by fmw42
Anthony,
Correct me if I am wrong, but does not the SVG standard support the use of url pointing to an image. So could one not make an SVG frame with a place inside it specifying a url that can be changed to use any image probably of the same size as specified by the the frame element to the url? see
http://www.w3.org/TR/SVG/struct.html#ImageElement
Fred
Re: Adding svg frame around image
Posted: 2011-08-23T22:43:36-07:00
by anthony
I don't know SVG code that well. I have never actually needed to generate my own code, just make use of code of others and puzzle through small changes to existing code. For example convert a fill of an area to a outline stroke of an area. Note real heavy for SVG code understanding.
Most people I believe don't code in SVG directly either, but use a SVG editor.
Re: Adding svg frame around image
Posted: 2011-08-24T04:35:07-07:00
by pasaliczaharije
Tx for responses. It sound as nice trick to include image in svg. Will try that but i need to learn a little bit more on svg.
thx again.