diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2023-02-25 17:19:22 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-02-27 13:39:22 +0100 |
commit | f70a7b763f3fc3c2b223efd7cce02c4f01c00449 (patch) | |
tree | 59bd6db93ff46a887ef8b2e69ae6f1446a395d14 /Userland/Libraries/LibGfx | |
parent | 2c98eff558f43afb031d23b3ccbf9360ccee0149 (diff) | |
download | serenity-f70a7b763f3fc3c2b223efd7cce02c4f01c00449.zip |
LibGfx: Don't return after the first scan
Finally, it brings support for SOF0 images with several scans.
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r-- | Userland/Libraries/LibGfx/JPEGLoader.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/JPEGLoader.cpp b/Userland/Libraries/LibGfx/JPEGLoader.cpp index f34b837f6c..dcc2397918 100644 --- a/Userland/Libraries/LibGfx/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/JPEGLoader.cpp @@ -1342,6 +1342,7 @@ static ErrorOr<Vector<Macroblock>> construct_macroblocks(JPEGLoadingContext& con TRY(read_start_of_scan(*context.stream, context)); TRY(scan_huffman_stream(*context.stream, context.current_scan.huffman_stream)); TRY(decode_huffman_stream(context, macroblocks)); + } else if (marker == JPEG_EOI) { return macroblocks; } else { dbgln_if(JPEG_DEBUG, "{}: Unexpected marker {:x}!", TRY(context.stream->tell()), marker); |