Commit Graph

6 Commits

Author SHA1 Message Date
aplefull
b3bdb202f8 LibGfx: Allow decoding of GIFs with empty LZW data
The decoder was requiring GIF files to be at least 32 bytes, but the
actual minimum for a valid GIF is only 26 bytes:
- 6 bytes for the header
- 7 bytes for the Logical Screen Descriptor
- 10 bytes for the Image Descriptor
- 2 bytes for the LZW minimum code size and block terminator
- 1 byte for the GIF trailer

This change allows us to load minimal 1x1 GIFs with empty LZW data.
They are commonly used on the web as transparent placeholders with
minimal file size.
2025-10-02 11:04:35 +02:00
Jelle Raaijmakers
2687246808 LibGfx: Use NonnullRefPtr<Bitmap> for frame descriptors
This makes it a bit easier to reason about where bitmaps should be
available.
2025-06-25 22:54:48 +12:00
aplefull
57d0c563e0 LibGfx: Fix handling of partially corrupt GIFs
GIF loader was completely failing when encountering errors with
frame descriptors or individual frames, even when some frames were
successfully loaded. Now we attempt to decode at least some frames
and fail only when no frames can be decoded at all.
2025-03-20 16:12:53 +01:00
R-Goc
94de31ff3b AK: Remove fast_u32_xxx apis from Memory.h
This commit removes the fast_u32_fill and fast_u32_copy functions,
as they were only used in one place, and are not optimal.
2025-03-03 15:58:27 +01:00
Pavel Shliak
8a07131229 LibGfx: Clean up #include directives
We actually include what we use where we use it.
This change aims to improve the speed of incremental builds.
2024-11-20 21:13:23 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00