Wykres commitów

20 Commity (patch-exception-handling)

Autor SHA1 Wiadomość Data
Phil Howard cd2e412ef4 MicroPython: Add MP_ERROR_TEXT() for mp_raise_msg() calls. 2025-04-25 17:33:53 +01:00
Phil Howard 5ed7913a2c MicroPython: Fix errors reporting an errno. 2025-04-25 17:33:53 +01:00
Phil Howard 5aaf5d3608 MicroPython: Add MP_ERROR_TEXT() around errors.
This is required for MicroPython error text compression which is
going to be enabled by default for RP2 builds.

We have a lot of error messages, so the potential flash gain here
is worth the effort of making this work.
2025-04-25 17:33:53 +01:00
Phil Howard 1488a0b796 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-04-25 17:33:53 +01:00
Phil Howard f533177731 PNG/JPEGDEC: Use MP_ROM_QSTR. 2025-04-25 17:33:53 +01: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
Phil Howard a537672dd4 PNGdec: Don't convert greys if mode=COPY. 2024-03-28 15:35:05 +00:00
Phil Howard d34e692f51 PNGdec: Don't add palette_offset twice. 2024-03-28 15:30:32 +00:00
Phil Howard 27b913124c PNGdec: Add copy support and offset to greyscale. 2024-03-28 15:04:06 +00:00
Phil Howard c7b788cd1d PNGdec: Add palette offset arg.
Allow index colour PNGs to be copied with a palette offset.

EG: a 4bit PNG could be offset 16 times for as many colour variations.
2024-03-28 15:04:02 +00:00
Phil Howard 19fa8864cf PNGdec: Add greyscale support.
Add an optional MODE_PEN to draw the PNG in the current pen colour.

Best used with, but not limited to, 1bit PNG images.
2024-03-27 12:49:09 +00:00
Phil Howard 10221066dd PNGDEC: Support for 1bpp. 2024-02-27 13:31:52 +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 c9fd68ec58 PNGDEC: Remove PNG RAM debug text. 2023-09-06 09:39:28 +01:00
Phil Howard 5a92a9c735 PNGDEC: Support for 2bpp indexed PNGs, fix open_RAM. 2023-09-04 13:55:15 +01:00
Phil Howard 4ad6df5cc3 PNGDEC: Rotation support. 2023-08-03 16:30:25 +01:00
Phil Howard 5ec6903f7f PNGDEC: Clean up API, add get_palette and index copy. 2023-07-21 13:23:08 +01:00
Phil Howard 6db7a9a0a6 PNGDEC: Add crude cropping/scaling. 2023-07-21 10:19:31 +01:00
Phil Howard 1630ddbbb2 PicoGraphics: Add support for PNG decoding. 2023-07-19 16:04:05 +01:00