Creating an effect plugin for a new blend mode
Hey Folks. I'm developing an effect plugin that will implement a new blend mode. Here is how it will work from the user's point of view:
1) Add a background image layer to the composition.
2) Add a foreground image layer.
3) Set the "adjustment layer" flag on the foreground layer.
4) Apply my affect to the foreground layer.
Here's the problem: In order to blend the foreground layer with the pixels behind it, I need to get the pixels for the foreground layer, and the pixels behind that layer. Getting the pixels behind the layer is easy. I simply call checkout_layer_pixels() on the layer that my effect is applied to, and since it's an adjustment layer, it gives me the pixels behind it. However, I don't know how to get the original foreground pixels in my layer.
How would I get the foreground pixels?