Page 1 of 1

[SOLVED] Nanojpeg module example, video from Damien

Posted: Sat May 18, 2019 4:38 pm
by shazz
Hi,

I was watching the video from Damien: MicroPython Melbourne Meetup: Wrap C In MicroPython.
And I thought it would be cool to add the JPEG decoder to the Meowbit.
As Damien in the video, same issue, the programs allocates too much memory to fit in the STM32F4

I was wondering if somebody tried to patch the nano jpeg decoder library to use less memory.

Re: [SOLVED] Nanojpeg module example, video from Damien

Posted: Sun May 19, 2019 1:56 am
by shazz
Ah, I found picojpeg, another JPEG decoder but optimized for MCU, only 2K of RAM used!

Re: [SOLVED] Nanojpeg module example, video from Damien

Posted: Sun May 19, 2019 6:27 am
by mattyt
Would be very cool to see a module built around picojpeg! :)

Coincidentally the Melbourne MicroPython Meetup is on this Wednesday night - if you're able to get it working I'll let everyone know...

Re: [SOLVED] Nanojpeg module example, video from Damien

Posted: Sun May 19, 2019 12:59 pm
by shazz
Hi mattyt,

It already works, at least on my Meowbit (STM32F4 + flash or sd + TFT7735), was not complicated:
https://github.com/shazz/micropython/bl ... modimage.c

this module relies on the Framebuf module somewhat modified to handle more modes (16 colors, 256 colors, rgr565...)

If any question, just ask :)