View Single Post
Old 31st January 2012, 10:45   #99  |  Link
panzerboy
Registered User
 
Join Date: Nov 2010
Posts: 2
GIMP style layer merge plugin

http://sourceforge.net/projects/avisynthgmplyr/files/?

This is an implementation of GIMPs layers as AVIsynth merge filters.
See the GIMP docs for the types of merges.
http://docs.gimp.org/2.6/en/gimp-con...ayer-modes.htm

I've cribbed the code from the GIMP source (mostly the pixel arithmetic) and inserted it into the SDK example 1.7.
Amazingly, it all seems to work!

So there's 20 merge filters in AvisynthGimpLayer.dll (must think of a better name).

Normal(clip, clip, opacity=float)
Multiply(clip, clip, opacity=float)
Divide(clip, clip, opacity=float)
Screen(clip, clip, opacity=float)
GimpOverlay(clip, clip, opacity=float)
Burn(clip, clip, opacity=float)
Dodge(clip, clip, opacity=float)
Hardlight(clip, clip, opacity=float)
Softlight(clip, clip, opacity=float)
GrainExtract(clip, clip, opacity=float)
GrainMerge(clip, clip, opacity=float)
Difference(clip, clip, opacity=float)
Addition(clip, clip, opacity=float)
Subtract(clip, clip, opacity=float)
DarkenOnly(clip, clip, opacity=float)
LightenOnly(clip, clip, opacity=float)
Hue(clip, clip, opacity=float)
Saturation(clip, clip, opacity=float)
Colour(clip, clip, opacity=float)
Value(clip, clip, opacity=float)

They work on RGB or RGBA clips only.
The last four Hue, Saturation, Colour and Value have a RGB-HSV conversion and back.
So they will probably run extra slow.

So why?
I play with mandelbrots with the Fractal Extreme program.
I started off with static pictures now I tend to do zoom movies.
With the static pictures I often generate multiple copies of the mandelbrot with different colour palettes and mappings.
These get layered in GIMP.
Lately I've been doing similar with the movies using Merge, Mergechroma and MergeLuma.
I wanted to do a movie of a older static picture
http://www.flickr.com/photos/panzerboy/6233908023/
, to get an match I needed the same layering that GIMP provides.
http://youtu.be/Nk5aeJi22bg
panzerboy is offline   Reply With Quote