summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx/JPGLoader.cpp
AgeCommit message (Collapse)Author
2020-09-21LibGfx+JPGLoader: Use InputMemoryStream instead of BufferStream.asynts
2020-09-10JPGLoader: Check existence of Huffman tables in scan header segment (#3442)Devashish Jaiswal
DC and AC table IDs read in the scan header segment weren't validated against the IDs of Huffman tables read in the DHT segment. This caused an OOB read when a Huffman table was accessed using the ID read in the scan header segment. Furthermore, the decoder now replaces the old DC or AC table if a redefinition has been found prior to the scan header. Fixes #3439.
2020-08-16AK: Rename KB, MB, GB to KiB, MiB, GiBNico Weber
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9". The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30". Let's use the correct name, at least in code. Only changes the name of the constants, no other behavior change.
2020-08-12LibGfx: Mark compilation-unit-only functions as staticBen Wiederhake
This enables a nice warning in case a function becomes dead code.
2020-08-12Meta: Replace remaining LibM/math.h includes with math.hLinus Groh
2020-08-06Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)asynts
This function did a const_cast internally which made the call side look "safe". This method is removed completely and call sites are replaced with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the behaviour obvious.
2020-08-04Revert "LibM: Always include <math.h> instead of <LibM/math.h>"Andreas Kling
This reverts commit dc12cbca41b8b667ae7ced1066647d47186d1557. Sadly this broke the build due to some confusion about <new>. Reverting until this can be solved fully.
2020-08-04LibM: Always include <math.h> instead of <LibM/math.h>Andreas Kling
This makes Lagom pick up the host math.h, which is what we want.
2020-07-23Lagom: Add LibGemini, LibGfxNico Weber
They are dependencies of LibWeb and might be useful for running test-web on GitHub actions one day.
2020-07-16LibGfx: Set correct frame type on JPEG imagesstelar7
2020-06-28LibGfx+JPGLoader: Print failure message for progressive JPEGsdevashish
2020-06-27LibGfx+JPGLoader: Fix decoding outside of LibWebdevashish
The DC reset interval was initialized to garbage :)
2020-06-23JPGLoader: Move JPGLoader internal structs and #defines to JPGLoader.cppdevashish
2020-06-23LibGfx: Integrate JPEG decoder with rest of the systemdevashish
This patch adds functions like `load_jpeg` to JPGLoader to make the JPEG decoder conform to the API that bitmap loader uses :^)
2020-06-23LibGfx+LibWeb: Add JPEG decoder and integrate with LibWebDevashish
This patch adds support for JPEG decoding. The JPEG decoder is capable of handling standard 2x1 horizontal, 2x1 vertical and quartered chroma subsampling. The implemented Inverse DCT performs with a decent speed. As of interchange formats, since we tend to ignore the metadata in APPn markers, the decoder can handle any format compatible with JFIF, which includes EXIFs and sometimes WebMs too. The decoder does not support progressive JPEGs yet.