Lucas CHOLLET
fb79aa6159
LibGfx/GIF: Correctly write frames with a non-null position
2024-05-25 06:42:15 +01:00
Lucas CHOLLET
07446bbea1
LibGfx/GIF: Use the correct reference to seek before the trailer
...
This was working with files, but with pre-allocated buffers, the end
is not the same position as last written byte.
2024-05-22 13:29:05 -04:00
Lucas CHOLLET
3c4b8749f0
LibGfx/GIF: Write a Graphic Control Extension block
...
This allows us to write the duration of each frame.
2024-05-22 13:29:05 -04:00
Lucas CHOLLET
bee8dd76ee
LibGfx/GIF: Write the netscape extension block
...
This allows us to encode the required number of loops in the file.
2024-05-22 13:29:05 -04:00
Lucas CHOLLET
777e84b09b
LibGfx+animation: Support writing animated GIF files
2024-05-21 09:47:46 +02:00
Lucas CHOLLET
6a5f8b5163
LibGfx/GIF: Make write_logical_descriptor() take an IntSize
...
The bitmap was only needed for its size.
2024-05-21 09:47:46 +02:00
Lucas CHOLLET
615d845ff2
LibGfx/GIF: Prefer local tables over a global one
...
Let's use local tables so every frame can use its own table.
2024-05-19 07:20:15 +02:00
Lucas CHOLLET
f21a4111d2
LibGfx/GIF: Rename write_global_color_table => write_color_table
...
Local and Global tables are the exact same thing from an encoding
perspective.
2024-05-19 07:20:15 +02:00
Lucas CHOLLET
a0401b0d86
LibGfx/GIF: Add support for colors
...
To determine the palette of colors we use the median cut algorithm.
While being a correct implementation, enhancements are obviously
existing on both the median cut algorithm and the encoding side.
2024-05-18 18:30:07 +02:00
Lucas CHOLLET
2513a1b83f
LibGfx: Add a GIF writer
...
This version is really barebone as it does not support colors (only
black and white) or animated images.
2024-05-14 12:33:53 -06:00