Creating png text images with transparent background

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?".
Post Reply
ophelius
Posts: 3
Joined: 2015-10-06T18:46:20-07:00
Authentication code: 1151

Creating png text images with transparent background

Post by ophelius »

I would like to create automatic text png images with semi-transparent background so I can overlay them on top of video clips. If using Paint.Net, I would color the background layer black, then change the opacity of the background layer to let's say 50/256, then I create a new layer on top and place my white text there. I save it as a png, it asks me to flatten it, I choose yes, works great. Overlayed on top of my videos the semi-transparency of the black background dims the video a little, and the white text looks good.

Doing research on imagemagick's convert.exe, I tried many things to get the same automatic result. Here's what I have so far:

convert -alpha on -background #00000050 -fill white -font Candice -size 800x600 -gravity Center caption:"Test 1 2 3" png32:temp.png

When I overlay this image on top of my video, the black background shows up and isn't transparent. I added 'png32:' to the output file since convert.exe saves it as 8-bit, and I noticed that using Paint.net it saves it as 32.bit. But it doesn't seem to help.

Any feedback would help greatly.

Thanks
ophelius
Posts: 3
Joined: 2015-10-06T18:46:20-07:00
Authentication code: 1151

Re: Creating png text images with transparent background

Post by ophelius »

Never mind, this works fine. The setting for transparency in my video program was set to off.
Post Reply