overlaying an svg image with transparency over simple image

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?".
Locked
manit
Posts: 157
Joined: 2009-01-30T22:31:26-07:00

overlaying an svg image with transparency over simple image

Post 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.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: overlaying an svg image with transparency over simple image

Post by snibgo »

Insert "-background None" before reading the SVG.
snibgo's IM pages: im.snibgo.com

manit
Posts: 157
Joined: 2009-01-30T22:31:26-07:00

Re: overlaying an svg image with transparency over simple image

Post by manit »

I added -background None within parentheses in my command .
Now, the problem is solved .
Thanks.

Locked