Skip to content

bitmaptools: add alphablend #5544

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 community.

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 6 commits into from
Nov 8, 2021
Merged

bitmaptools: add alphablend #5544

merged 6 commits into from
Nov 8, 2021

Conversation

jepler
Copy link

@jepler jepler commented Nov 4, 2021

This blends two "565"-format bitmaps, including byteswapped ones. All the bitmaps have to have the same memory format.

The routine takes about 63ms on a Kaluga when operating on 320x240 bitmaps. Of course, displaying the bitmap also takes time.

There's untested code for the L8 (8-bit greyscale) case. This can be enabled once gifio is merged.

The demo below is real-time. It's using directio (display_bus.send(44, bitmap)) to send bitmap data to avoid displayio overhead.

PXL_20211104_213146186.mp4.2.mp4

This blends two "565"-format bitmaps, including byteswapped ones. All
the bitmaps have to have the same memory format.

The routine takes about 63ms on a Kaluga when operating on 320x240 bitmaps.
Of course, displaying the bitmap also takes time.

There's untested code for the L8 (8-bit greyscale) case. This can be
enabled once gifio is merged.
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. Just needs to be updated.

@jepler
Copy link
Author

jepler commented Nov 5, 2021

It doesn't fit on pybadge or pygamer.

@jepler jepler requested a review from tannewt November 6, 2021 00:13
@jepler
Copy link
Author

jepler commented Nov 6, 2021

The PR has been updated to include "L8" (greyscale) blending, & several boards that are unlikely to need it have had framebufferio disabled in order for this to fit.

@jepler jepler mentioned this pull request Nov 8, 2021
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.

Thank you!

@tannewt tannewt merged commit bb71f8c into adafruit:main Nov 8, 2021
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