Jump to content
Peter Werner

Overflow artifacts in Apply Image

Recommended Posts

Trying out the awesome new Equations feature in "Apply Image", I found that expressions that lead to out-of-bounds values are not handled gracefully (8-bit mode).


My test was a simple color difference greenscreen keyer:

DA = SG - max(SR, SB)

The result has artifacts where this expression yields negative results. 


Doing the clamping manually works fine.

DA = max(0, SG-max(SR, SB))

It would make more sense to always have this clamping performed automatically and implicitly for non-float documents. This would also ensure that more expressions and macros created for unbounded floating point images will work with 8-bit and 16-bit documents without adjustments.


I have also not been able to find out how to access the current pixel's coordinates inside Apply Image (seems to work for "Distort > Equations" expressions) and what the syntax for modulo operators is, but that's likely either due to my stupidity or it not being implemented yet and not a bug. Also, I noticed a strange 1-pixel diagonal line pattern when choosing a source layer and then navigating to an adjustment layer in the Layers panel.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.