Skip to content
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

Fixes for PNGDEC on Badger 2040 / Badger 2040 W #907

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Conversation

Gadgetoid
Copy link
Member

These fixes are required for PNGDEC to function correctly on Badger 2040 and Badger 2040 W, so it can be added - pimoroni/badger2040#75

The fix to PicoGraphics_Pen1BitY::set_pen corrects handling of RGB and ARGB PNGs.

The fix to PNGDEC adds explicit support for 1bit PNGs, which would obviously be desirable on a 1bit display.

@Gadgetoid
Copy link
Member Author

I've run through some tests rendering PNGs on Badger 2040 W with these changes. Tried what I hope are 1bit, 2bit, 4bit and 8bit indexed plus RGB with the desired results.

Ignore the...weirdness of these test images, I missed the "include unused colours" tickbox in GiMP's colour conversion dialog and uh, got creative....

1bpp
badge-1bpp

2bpp
badge-2bpp

4bpp
badge-4bpp

8bpp
badge-8bpp

rgb
badge-rgb

rgb
badgerpunk

Note: In all cases these will be crushed to 1bit since Badger 2040 is monochrome only, but RGB or higher colour depths should use the 16 step dithering patterns. The most obvious way to see this in effect is the RGB badgerpunk full screen image.

@Gadgetoid Gadgetoid merged commit d831074 into main Feb 27, 2024
28 checks passed
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.

1 participant