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

Not enough memory for PNG decoding on Inky Frame 5.7" #823

Open
lrasinen opened this issue Aug 24, 2023 · 2 comments
Open

Not enough memory for PNG decoding on Inky Frame 5.7" #823

lrasinen opened this issue Aug 24, 2023 · 2 comments

Comments

@lrasinen
Copy link

I'm trying to do a weather display with 50x50 weather icons, but creating the pngdec.PNG object fails because it wants the 48k of memory right off the bat.

As @bitbank2 commented (#802 (comment)) I don't need the full 32k sliding window for my tiny icons. If that was configurable during initialization it'd be great.

@bitbank2
Copy link

I understand the situation and would like to assist, but I'm super busy on other projects. I'm open to proposals to change the code to allow flexible sliding window sizes at runtime. Could you propose the needed changes?

@lrasinen
Copy link
Author

Had a quick look through the code and the sliding window buffer is allocated statically: https://github.com/pimoroni/pimoroni-pico/blob/57042bfed3b2fbd45b2e1c36582e3b9bfff3faf9/libraries/pngdec/PNGdec.h#L152C5-L152C48

If that could be given as a constructor parameter and then add all the necessary plumbing back to the Python level that'd probably do it.

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

No branches or pull requests

2 participants