diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2023-02-28 00:40:50 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-04-03 17:06:21 +0100 |
commit | f42d850211bbdbd24e481a4763933cae37e8b728 (patch) | |
tree | 42e9abbb723409a47e8828bf9df9148dcebaef29 /Userland | |
parent | fbad9a70fc743621064c83fa90f705b1a615f455 (diff) | |
download | serenity-f42d850211bbdbd24e481a4763933cae37e8b728.zip |
LibGfx/JPEG: Don't reject SOF2 image with successive approximations
It means full SOF2 JPEG support, yay!
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp index 251375e834..d300ac4407 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp @@ -752,8 +752,7 @@ static ErrorOr<void> read_start_of_scan(Stream& stream, JPEGLoadingContext& cont current_scan.successive_approximation_high, current_scan.successive_approximation_low); - // FIXME: Support SOF2 jpegs with current_scan.successive_approximation != 0 - if (current_scan.spectral_selection_start > 63 || current_scan.spectral_selection_end > 63 || successive_approximation != 0) { + if (current_scan.spectral_selection_start > 63 || current_scan.spectral_selection_end > 63 || current_scan.successive_approximation_high > 13 || current_scan.successive_approximation_low > 13) { dbgln_if(JPEG_DEBUG, "ERROR! Start of Selection: {}, End of Selection: {}, Successive Approximation High: {}, Successive Approximation Low: {}!", current_scan.spectral_selection_start, current_scan.spectral_selection_end, |