OpenShot / libopenshot

OpenShot Video Library (libopenshot) is a free, open-source project dedicated to delivering high quality video editing, animation, and playback solutions to the world. API currently supports C++, Python, and Ruby.
http://www.openshot.org
GNU Lesser General Public License v3.0
1.26k stars 271 forks source link

Feature Request: Blend Modes #320

Open jeffski opened 5 years ago

jeffski commented 5 years ago

I've been thinking about this for a while and might take a look at if I get a chance - blend modes.

Photoshop, Premiere and other video/photo editing software have blend modes where you can control the way images blend over each other. With video it's really effective for overlaying light leaks, weather effects etc..

I noticed that Qt QPainter has CompositionModes and several of these equate to what you would see in Adobe products (screen, multiply, dodge, etc...).

Also it seems that Timeline and Frame already use this:

painter.setCompositionMode(QPainter::CompositionMode_SourceOver);

So I'm wondering if this could be set by the user to a selection of sane presets to effectively add blend modes to libopenshot/OpenShot?

Any pointers or advice much appreciated and I can start investigating.

SG57 commented 3 years ago

Any work done on this? I may do it myself, seems silly not to support this.

nilp0inter commented 2 years ago

I find this feature quite essential for working with overlays. Right now the only option is to do some trickery with the alpha settings and maybe chroma effect, but it doesn't look good.

I may get this a try over the weekend. @jeffski , @SG57 have you done any work on this?

I guess we'll need a new attribute in the Clip class for settings the blend mode that would be used in Timeline::add_layer to set the appropriate composition mode. Any thoughts?