1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 10:54:57 +00:00
Commit graph

17 commits

Author SHA1 Message Date
Andreas Kling
c4d75ac11a LibGfx/GIF: Avoid a silly loop in GIF logical screen parsing 2024-01-05 13:20:00 +01:00
Andreas Kling
182a2b0c3a LibGfx/GIF: Only parse global color table if header flag is set
This fixes an issue where GIF images without a global color table would
have the first segment incorrectly interpreted as color table data.

Makes many more screenshots appear on https://virtuallyfun.com/ :^)
2024-01-05 13:20:00 +01:00
Lucas CHOLLET
ce6cd4f45f LibGfx/GIF: Use LZWDecoder::decode_all() 2023-12-01 12:58:14 +01:00
Lucas CHOLLET
5e2b049de8 LibCompress/LZW: Use a LittleEndianBitStream
No need to manually implement bit stream logic when we have a helper for
this task.
2023-11-08 18:19:34 +01:00
Lucas CHOLLET
00ad8419cf LibGfx+LibCompress: Extract the LZW decoder and move it to LibCompress
Let's put this state-of-the-art decoder from the 80's in its own file in
order to reuse it with other formats, such as TIFF or PDF.
2023-11-08 18:19:34 +01:00
Lucas CHOLLET
a86c0ac003 LibGfx/GIF: Use east-side const 2023-11-08 18:19:34 +01:00
Lucas CHOLLET
e721c74598 LibGfx: Provide an implementation for ImageDecoderPlugin::icc_data() 2023-10-29 07:21:10 +00:00
MacDue
bbf66ea055 LibGfx: Remove maximum size limit for decoded images
It is unlikely this is needed anymore, and as pointed out things should
now safely return OOM if the bitmap is too large to allocate.

Also, no recently added decoders respected this limit anyway.

Fixes #20872
2023-09-03 14:36:54 +02:00
Lucas CHOLLET
500097de82 LibGfx/GIF: Decode the header in create()
Again, header includes the logical screen descriptor here. This is done
as a part of #19893.
2023-07-15 09:44:30 +02:00
Lucas CHOLLET
294217586b LibGfx/GIF: Move the code to read the header to its own function
By header, I include the logical screen descriptor here, so all the
information that is not specific to each frame.
2023-07-15 09:44:30 +02:00
Lucas CHOLLET
b8bc84a3e8 LibGfx/GIF: Only use a FixedMemoryStream
This allows us to drop the data pointer in the `GIFLoadingContext`.
2023-07-15 09:44:30 +02:00
Lucas CHOLLET
1192e46c09 LibGfx/GIF: Don't read the header twice
This is already done in `load_gif_frame_descriptors()`. As the method
`initialize()` is now empty, we can delete it.
2023-07-15 09:44:30 +02:00
Lucas CHOLLET
e5b70837de LibGfx: Remove ImageDecoder::set_[non]volatile()
These methods are unused so let's remove them.
2023-07-08 01:45:46 +01:00
MacDue
e7cddda7e1 LibGfx: Allow passing an ideal size to image decoders
The ideal size is the size the user will display the image. Raster
formats should ignore this parameter, but vector formats can use
it to generate a bitmap of the ideal size.
2023-07-03 23:54:51 +02:00
Ben Wiederhake
da394abe04 LibGfx+Fuzz: Convert ImageDecoder::initialize to ErrorOr
This prevents callers from accidentally discarding the result of
initialize(), which was the root cause of this OSS Fuzz bug:

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary
2023-05-12 09:40:24 +01:00
Tom
e7921cfe14 LibGfx: Add first_animated_frame_index method to ImageDecoder
Some image formats such as APNG may not use the first frame for
animations.
2023-05-05 15:20:44 +01:00
Lucas CHOLLET
496b7ffb2b LibGfx: Move all image loaders and writers to a subdirectory 2023-03-21 22:39:25 +01:00
Renamed from Userland/Libraries/LibGfx/GIFLoader.cpp (Browse further)