Page 1 of 1

RGB SVG to Targe with Alpha Channel

Posted: 2007-02-22T00:53:50-07:00
by kpettit
Hi all,
New to Im. Looking for a way to convert an SVG with transparancies to a Targa with Alpha channel.
Is this possible through IM?

Want to extract alpha from SVG then create grey scale with data to then be applied like below.

Code: Select all

convert = "composite -compose Copy_Opacity greyscale.jpg  red2.jpg  compose_mask.tga"
Sincerely,
Ken...

Re: RGB SVG to Targe with Alpha Channel

Posted: 2007-02-22T19:29:02-07:00
by anthony
That should work. As you are using JPG (not a good idea as JPG is inexact) you do not have any matte channel to remove before the composition. As such the CopyOpacity composition should use the source image as a greyscale mask.

What does "identify" say about the result?

Have you tried it with PNG to see if that produces transparency?

Can you give us some example images where it is failing?

Re: RGB SVG to Targe with Alpha Channel

Posted: 2007-02-23T11:45:10-07:00
by kpettit
If possible I would like to only use one file to convert an transparent SVG to a Targa with an Alpha Channel.

Here is the code I'm using right now... It renders transparencies as opaque.

Code: Select all

$convert = "convert -background none 7.svg 7.tga";
Here is the SVG.
http://www.deliciousbanner.com/imageMag ... ages/7.svg

This is the converted file it returns.
http://www.deliciousbanner.com/imageMag ... ages/7.tga

Ken...