Merging transparency with a png
Posted: 2010-09-24T07:59:21-07:00
I have two 7x7 pixel PNG files. One contains a red triangle with the other half of the image being fully transparent white; the other image is totally opaque. I'm trying to create a 47x7 PNG which has the one image at the left and the other at the right with a similarly transparent white background. I've tried saying:
convert -size 47x7 xc:transparent Triangle.png -geometry +40+0 -composite 1.png -composite New.png
This gives me a 47x7 PNG with a transparent background with the image from 1.png on the left and the image from Triangle.png on the right. However, the transparent region from Triangle.png shows up in solid black. I've tried playing with the -alpha option (and tried reading lots of similar examples in the docs) but can't get it to copy the transparency through.
Any help much appreciated!
convert -size 47x7 xc:transparent Triangle.png -geometry +40+0 -composite 1.png -composite New.png
This gives me a 47x7 PNG with a transparent background with the image from 1.png on the left and the image from Triangle.png on the right. However, the transparent region from Triangle.png shows up in solid black. I've tried playing with the -alpha option (and tried reading lots of similar examples in the docs) but can't get it to copy the transparency through.
Any help much appreciated!