1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

LibGfx: Don't return after the first scan

Finally, it brings support for SOF0 images with several scans.
This commit is contained in:
Lucas CHOLLET 2023-02-25 17:19:22 -05:00 committed by Andreas Kling
parent 2c98eff558
commit f70a7b763f

View file

@ -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);