Page 1 of 1

overlaying an svg image with transparency over simple image

Posted: 2020-02-23T12:09:38-07:00
by manit
Hi,
I am using
$ display --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2019-11-12 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
on
$ uname -a
Linux lxuser-ThinkPad-E470 4.15.0-88-generic #88~16.04.1-Ubuntu SMP Wed Feb 12 04:19:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

I ran the following command
convert background.png ( ball.svg -resize 80x80 -rotate -324 ) -geometry +461+454 -composite output.png
This is the svg image I am overlaying over background.png
https://www.iconninja.com/files/60/832/ ... g-icon.svg
I want that transparent area of svg file should show the background.png in that area.
Please note that background.png is big and svg overlaid on it at specific position is small.
background.png was created using following command :-
convert -size 900x900 xc:white background.png

How should I modify my composite command ?

Thnaks.

Re: overlaying an svg image with transparency over simple image

Posted: 2020-02-23T12:45:00-07:00
by snibgo
Insert "-background None" before reading the SVG.

Re: overlaying an svg image with transparency over simple image

Posted: 2020-02-23T21:59:53-07:00
by manit
I added -background None within parentheses in my command .
Now, the problem is solved .
Thanks.