Phil Howard
7fee95d668
PNG/JPEGDEC: Remove finalizer.
...
Remove the finalizer from PNGDEC and JPEGDEC, since it was both redundant
and actively harmful.
The finalizer was just calling "close" which is unecessary since the file
is closed automatically after opening/rendering and not left open.
If a file did not exist and "open_file" bailed with ENOENT then it would
be left in an unknown state, and the finalizer calling "close" would
cause a hardlock.
2025-03-28 10:31:01 +00:00
Phil Howard
25627588c3
PNG/JPEGDEC: Use MP_ROM_QSTR.
2025-03-28 10:31:01 +00:00
Phil Howard
517f8ae1cd
global: Remove the STATIC macro.
...
Reflect the changes proposed in micropython/micropython#13763 .
2024-06-03 13:44:23 +01:00
Phil Howard
47e3aed88f
MicroPython: Switch to mp_obj_malloc_with_finaliser.
2024-06-03 11:40:29 +01:00
Skyler Mansfield
b23a71b889
JPEGDEC: Backport width/height changes from pngdec.
...
Open JPEG file or stream to read width/height before decode.
2024-01-23 16:18:13 +00:00
Phil Howard
d45daef654
MicroPython: Switch from MICROPY_EVENT_POLL_HOOK to mp_event_handle_nowait().
...
Note: Unsure if mp_event_handle_nowait() is the right answer in all cases,
but this seems to be what we want in our blocking loops.
2024-01-08 10:33:28 +00:00
Phil Howard
4b3e83f2ff
JPEGDEC: Treat byte arrays as raw JPEG data for #435 .
2023-09-29 09:18:55 +01:00
Mike Bell
be943bd5a0
Fix build
2023-08-14 12:40:15 +01:00
Mike Bell
f4b8bc9025
Fix Micropython build
2023-08-14 12:40:15 +01:00
Phil Howard
b74b371d2b
JPEGDEC: Don't pass filename through std::string.
...
The result of GET_STR_DATA_LEN should be null terminated, so converting to a std::string and then using .c_str() is both redundant and need
s heap.
2023-03-16 13:25:19 +00:00
Phil Howard
bea90dfd60
JPEGDEC: Experimental 3bit/4bit palette no-dither.
2023-02-22 15:40:22 +00:00
Phil Howard
4928ceff8d
Inky 7.3: Add pen type to JPEGDEC.
2023-02-20 12:29:59 +00:00
Phil Howard
9bd29e0ef2
JPEGDEC: Fix iWidthUsed skip not advancing pixel pointer.
2023-02-10 22:12:02 +00:00
Phil Howard
13414b5037
JPEGDEC: Clip drawing to iWidthUsed.
...
Corrects clipping width using new iWidthUsed value, noticable particularly on smaller jpegs and those that aren't a multiple of the MCU sized.
Fixes #573
2022-12-14 18:42:03 +00:00
Phil Howard
241e725464
JPEGDEC: Sync with upstream.
...
Adds setUserPointer and pDraw->pUser which we now use to store a pointer to the PicoGraphics instance.
2022-12-13 14:21:57 +00:00
Phil Howard
e0a1627fba
JPEGDEC/PicoGraphics: Add support for RGB888 target.
...
Fixes https://github.com/pimoroni/pimoroni-pico/issues/573
2022-12-13 14:03:30 +00:00
Phil Howard
fddac54f86
JPEGDEC: Add option to disable dither on RGB332.
2022-08-11 11:46:45 +01:00
jon
50c7bd69ee
Added missing switch case for new RGB888 pen type
2022-07-26 05:34:23 +01:00
Phil Howard
6c1556a429
PicoGraphics: 1bit/1bitY dither all drawing operations.
...
Note: Pen now ranges from 0 (black) to 15 (white). Values between will be dithered ala Badger 2040.
2022-07-06 11:32:56 +01:00
Phil Howard
12866a0b7b
PicoGraphics/JPEGDEC: Use PicoGraphics dither.
2022-07-06 10:56:56 +01:00
Phil Howard
cb5f8308a0
PicoGraphics/UC8159: 3bit bitplane pen mode.
...
Add a 3bit pen mode to save 1/4th the RAM needed for the 600x448 Inky Frame.
2022-06-30 15:25:02 +01:00
Phil Howard
7dbec2add6
JPEGDEC: Stream from filesystem.
...
Avoid loading jpeg files into RAM and stream from the filesystem to handle larger files gracefully.
2022-06-24 11:03:29 +01:00
Phil Howard
e3f98d56cf
PicoGraphics: UC8151 Support for Inky Pack.
2022-06-23 15:48:45 +01:00
jon
360bf4310c
SH1107: Add driver and example.
...
Add 1bit pen mode to PicoGraphics.
TODO:
* Rotation support
* Sizes other than 128x128 support
2022-06-15 16:57:40 +01:00
Phil Howard
31ade6af72
JPEGDEC: Open just before decode to avoid seek overrun.
2022-06-14 15:38:25 +01:00
Phil Howard
27d571b473
PicoGraphics: Tidy up dithering.
2022-06-14 15:06:44 +01:00
Phil Howard
2419f0ef45
PicoGraphics/JPEGDEC: RGB332 per channel fast dither.
2022-06-13 20:12:03 +01:00
Phil Howard
602d1b41dd
PicoGraphics: Attempt at dither and scanline interrupts.
...
Currently both unused and both very slow.
Dither may only be feasible for <=8 colour displays.
JPEGDEC will dither to 4-bit greyscale quite happily.
2022-06-13 20:12:03 +01:00
Phil Howard
656d69399a
JPEGDEC: Fix dither buffer size
2022-06-13 20:12:03 +01:00
Phil Howard
d2b065d2da
JPEGDEC: Use 4-bit dither.
2022-06-13 20:12:03 +01:00
Phil Howard
8917505175
JPEGDEC: Add open_file.
2022-06-13 20:12:03 +01:00
Phil Howard
7f0fe44881
JPEGDEC: Move to libraries, use C++, draw into PicoGraphics.
2022-06-13 20:12:03 +01:00