Change image's opacity from Python script

laschi

New Member
Dear community,

I'm working on a Python script which should allow me to overlay a video stream with text and image sources. The content of these sources should change on pressing a hot key. So far, so good, I've figured that out myself, reading documentation and diving into the sources of existing scripts.

I now want the transition to be smooth (basically fade-in / -out / -over). I also found out how to do this for text sources (basically by modifying the alpha channel in the color1 and color2 properties of the source's settings).

But I have not yet figured out how to fade in or out image sources of type "image_source" (I use that source as the script should mainly work on Linux, but also Mac and Windows, and "image_source" seems to be the only image source available on all three of them - am I right?).

So does an "image_source" have an "opacity" or "alpha channel" property - and if so, how is its name? And if not, any suggestions how to do this instead (links to the documentation or example scripts are welcome!)?

Best regards and many thanks in advance,

Laschi
 
Top