Add Midtone filter - #30
Open
individ-divided wants to merge 1 commit into
Open
individ-divided wants to merge 1 commit into
individ-divided wants to merge 1 commit into
Conversation
individ-divided
force-pushed
the
midtone
branch
from
September 20, 2026 17:38
b548d61 to
b335d31
Compare
individ-divided
force-pushed
the
midtone
branch
from
September 20, 2026 19:15
b335d31 to
c77417f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I've implemented a midtone filter to LaBLEr. I think this is useful for the LaBLEr app because it can compensate for the fact that a 50% dot coverage isn't 50% gray. One explanation is the non-linear effects of thermal exposure (duration and power). As a quick demonstration, I've inserted a picture below that shows the effect of trying to reduce the darkness of a linear gradient.
The left column shows the non-filtered linear gradient. With the new filter, it is possible to have the gradient remain gradual for the whole span while increasing its brightness (middle column). The right-most column is the original Contrast filter, for comparison.
Filter description
Move the highlights and shadows by adjusting the midpoint.
If the midpoint parameter is less than 50, the filter brightens the midtones. A value greater than 50 will darken the midtones. It applies a non-linear power curve (gamma) filter so that the midpoint is shifted to the new position.
This is a common image processing filter. You can do it in Gimp for instance, via the Levels dialog box. (Use the gray slider.)
This is my first Kotlin experience.
Best,
David