If I use "identify -verbose" and compare the original image, with the converted one, the alpha difference is,
original (that gives transparent webm) - Alpha: none #00000000
converted (that is white background) - Alpha: srgba(255,255,255,0) #FFFFFF00
So, how do I make the Alpha - none #00000000
?
png transparent background is black
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: png transparent background is black
try
Code: Select all
convert image -background black -alpha background newimage
Re: png transparent background is black
Doh, okay I figured it out. My images were good, but I somehow have two different versions of ffmpeg on my computer and was using the wrong one that doesn't seem to support transparency.
Now it is working.
My only issue is the last shell line,
for /f %x in ('dir /s /b blink*.png') do @composite -compose CopyOpacity mask-0.png %x %x
This only uses mask-0.png, instead of mask-1 for blink01.png, mask-2 for blink02.png etc.
Now it is working.
My only issue is the last shell line,
for /f %x in ('dir /s /b blink*.png') do @composite -compose CopyOpacity mask-0.png %x %x
This only uses mask-0.png, instead of mask-1 for blink01.png, mask-2 for blink02.png etc.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: png transparent background is black
You will need to change the -x in a variable for the mask-x.png image in your loop. I do not know what the @ is before composite. It is not IM syntax. Is this on Windows or Unix? Looks more like Windows syntax.
Re: png transparent background is black
windows, here is my final script,
for /f %x in ('dir /s /b talk*.png') do @convert -alpha extract %x %x-mask.png
mogrify -flatten talk*.png
for /f %x in ('dir /s /b talk*.png') do @composite -compose CopyOpacity %x-mask.png %x %x
works, end result here,
http://www.botlibre.com/avatar?id=1115544
for /f %x in ('dir /s /b talk*.png') do @convert -alpha extract %x %x-mask.png
mogrify -flatten talk*.png
for /f %x in ('dir /s /b talk*.png') do @composite -compose CopyOpacity %x-mask.png %x %x
works, end result here,
http://www.botlibre.com/avatar?id=1115544