From 7b510c38765fbb43343e8e2153013d9a2ac95e0e Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Fri, 9 Feb 2024 20:56:26 -0500 Subject: [PATCH] LibGfx/TIFF: Rename `scanline` => `image_row` This variable stores the number of rows from the beginning of the image, contrary to `row` that stores the number of rows relative to the start of the current segment. --- Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp index 3416094ce5..934cef992f 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp @@ -284,8 +284,8 @@ private: auto decoded_stream = make(move(decoded_strip)); for (u32 row = 0; row < rows_per_strip; row++) { - auto const scanline = row + rows_per_strip * strip_index; - if (scanline >= *m_metadata.image_length()) + auto const image_row = row + rows_per_strip * strip_index; + if (image_row >= *m_metadata.image_length()) break; Optional last_color {}; @@ -293,7 +293,7 @@ private: for (u32 column = 0; column < *m_metadata.image_width(); ++column) { if (metadata().photometric_interpretation() == PhotometricInterpretation::CMYK) { auto const cmyk = TRY(read_color_cmyk(*decoded_stream)); - oriented_bitmap.get().set_pixel(column, scanline, cmyk); + oriented_bitmap.get().set_pixel(column, image_row, cmyk); } else { auto color = TRY(read_color(*decoded_stream)); @@ -308,7 +308,7 @@ private: } last_color = color; - oriented_bitmap.get().set_pixel(column, scanline, color.value()); + oriented_bitmap.get().set_pixel(column, image_row, color.value()); } }