summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx/GIFLoader.cpp
AgeCommit message (Collapse)Author
2020-05-09LibGfx: Implement GIFImageDecoderPlugin animation methodsPeter Nelson
GIFImageDecoderPlugin now lazily decodes GIF frames as they are requested.
2020-05-09LibGfx: Optimise LZWDecoderPeter Nelson
Various optimisations to speed up LZWDecoder - Take advantage of the fact that we add new codes in the order they are discovered so no need to store the code as part of a separate CodeTableEntry structure. Instead we store directly store vectors of colors and the code is the index into the vector. - Cache current table capacity to avoid calling pow2 every time. - Prevent some unnecessary vector copies by returning by reference from get_output.
2020-05-09LibGfx: Add support for animated images to ImageDecoder{Plugin}Peter Nelson
Adds methods to determine whether an image is animated, how many times the animation loops, the number of frames, and to get individual frames. Implements stubs of these methods for PNGImageDecoderPlugin and GIFImageDecoderPlugin.
2020-04-25LibGfx: Fix crash on decoding small gifsPeter Nelson
The LZW decode step will now copy and pad LZW data out to 4 bytes if there are less than 4 bytes remaining in the buffer. This means it will now also work when the total size of the LZW image data is less than 4 bytes.
2020-04-25LibGfx: Don't proceed with GIF format sniffing if stream read failsAndreas Kling
2020-04-25LibGfx: Remove unnecessary castsPeter Nelson
2020-04-25LibGfx: Minor changes to adhere to code style guidelinesPeter Nelson
2020-04-25LibGfx: Add a sniff method to ImageDecoder and implement for GIF and PNGPeter Nelson
The sniff method is intended to be used for content sniffing. It should be a cheap test to rapidly rule out whether a candidate image can be successfully decoded. For the GIF and PNG implementations it simply attempts to decode the image header, returning true if successful and false if not.
2020-04-25LibGfx: Extract GIF header decoding into separate functionPeter Nelson
2020-04-25LibGfx: implement remaining GIFImageDecoderPlugin methodsPeter Nelson
2020-04-25LibGfx: decode first frame of GIF LZW dataPeter Nelson
Also: - Define the GIFLoadingContext structure. - The load_gif_impl function now returns load operation success, and takes a reference to a GIFLoadingContext as input. - Implement GIFImageDecoderPlugin::bitmap which calls onto load_gif_impl.
2020-04-25LibGfx: Implement GIF LZW decodingPeter Nelson
Add an LZWDecoder class that can decode GIF LZW data.
2020-03-08Userspace: Add missing #includes now that AK/StdLibExtras.h is smallerAndreas Kling
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-02-25AK, LibGfx, LibGUI: Initialize various variables to zero.Emanuel Sprung
The not initialized variables can lead to compiler warnings that become errors with the -Werror flag.
2020-02-15LibGfx: Remove unused Bitmap::load_from_file() for loading raw RGBAAndreas Kling
This was not used anywhere but added unnecessary members to Bitmap.
2020-02-06LibGfx: Rename GraphicsBitmap.{cpp,h} => Bitmap.{cpp,h}Andreas Kling
2020-02-06LibGfx: Rename from LibDraw :^)Andreas Kling