8000 Add bitmapfilter.blend by jepler · Pull Request #8859 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Add bitmapfilter.blend #8859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the comm 8000 unity.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 30, 2024
Merged

Add bitmapfilter.blend #8859

merged 8 commits into from
Jan 30, 2024

Conversation

jepler
Copy link
@jepler jepler commented Jan 29, 2024

Along with some pure Python functions to build the 4096-entry look up table, this should allow most photo editing layer blend modes to be implemented.

This is a almost a superset of bitmaptools.alphablend except that only RGB565_SWAPPED is supported and instead of having a skip index there is an optional mask bitmap; we should decide what to do about this. Part of that would include benchmarking the alternatives.

This can perform arbitrary channel mixing between two images.
Alpha blend & maximum functions are demonstrated in the test.
However, it should make most of the usual photo editing blends
possible. (for dissolve, fill a mask bitmap with random values,
which may be expensive to do from circuitpython code; we can
specifically accelerate it if we need to)
I've identified that this is a bottleneck when I am
refining documentation; by returning a bare minimum of data
to allow the doc build to complete, I can do more builds in less time.

To use, `env NO_BINDINGS_MATRIX= make html`
tannewt
tannewt previously approved these changes Jan 30, 2024
Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you!

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jepler jepler merged commit ef066da into adafruit:main Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0