Skip to content

Add drawPngFromBuffer #210

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

chrisjtwomey
Copy link

@chrisjtwomey chrisjtwomey commented Jul 5, 2023

Noticed the library has methods to draw bmp and jpg from buffer but not png, so I added it.

Tried it on my Inkplate10 (v1) and behaves identically to drawPngFromWeb

Personally I need a function like this as I download png data using a custom function (need to also read HTTP headers) and needed a way to write to the display without drawing again from a URL or SD card.

@chrisjtwomey chrisjtwomey changed the base branch from master to dev July 6, 2023 06:43
@stefanthoss
Copy link

Thanks, this is great -- I was looking for this function. Any way we can get this merged so it's easier to use?

Copy link

@stefanthoss stefanthoss left a comment

Choose a reason for hiding this comment

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

Code works for me, too!

Comment on lines +265 to +266
if (!buf)
return 0;

Choose a reason for hiding this comment

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

Duplicate code, it's already defined further down.

Copy link
Author

Choose a reason for hiding this comment

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

I'll fix this up if the maintainers ever consider merging this. Personally I don't see why not but looks like they haven't merged any PRs from non-SolderedElectronics members in years...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants