diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2023-03-01 19:43:08 -0500 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-03-25 21:31:21 +0100 |
commit | 3d7888f309a15a044a63cfe9c746a2fc381812e0 (patch) | |
tree | 6f342951185d355d238e8290129ab3a1777b501c /Userland/Libraries/LibGfx | |
parent | e18c87c60c8db89f37dc3987dc6ba5d9592f36e9 (diff) | |
download | serenity-3d7888f309a15a044a63cfe9c746a2fc381812e0.zip |
LibGfx/JPEG: Log components present in a scan
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r-- | Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp index 3158084ef3..1487f67273 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp @@ -650,6 +650,16 @@ static ErrorOr<void> read_start_of_scan(AK::SeekableStream& stream, JPEGLoadingC last_read.clear(); } + if constexpr (JPEG_DEBUG) { + StringBuilder builder; + TRY(builder.try_append("Components in scan: "sv)); + for (auto const& scan_component : current_scan.components) { + TRY(builder.try_append(TRY(String::number(scan_component.component.id)))); + TRY(builder.try_append(' ')); + } + dbgln(builder.string_view()); + } + current_scan.spectral_selection_start = TRY(stream.read_value<u8>()); current_scan.spectral_selection_end = TRY(stream.read_value<u8>()); current_scan.successive_approximation = TRY(stream.read_value<u8>()); |