From 569910216369c3693ef0dde2fd5f1e004d7bbdfc Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Fri, 23 Aug 2024 01:56:38 +0000 Subject: [PATCH] plug-ins: Fix TIFF Sketchbook layers import... ...when the height is larger than the width. Due to a copy/paste error, the width was used for both layer width and height. Since we only had two sample files and both images were wider than they were tall, this was not noticed. --- plug-ins/file-tiff/file-tiff-load.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plug-ins/file-tiff/file-tiff-load.c b/plug-ins/file-tiff/file-tiff-load.c index 80155ae012..b64991b991 100644 --- a/plug-ins/file-tiff/file-tiff-load.c +++ b/plug-ins/file-tiff/file-tiff-load.c @@ -2418,7 +2418,7 @@ load_sketchbook_layers (TIFF *tif, layer_name = tiff_get_page_name (tif); TIFFGetField (tif, TIFFTAG_IMAGEWIDTH, &layer_width); - TIFFGetField (tif, TIFFTAG_IMAGEWIDTH, &layer_height); + TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &layer_height); if (! TIFFGetField (tif, TIFFTAG_XPOSITION, &x_pos)) x_pos = 0.0f; @@ -2434,7 +2434,7 @@ load_sketchbook_layers (TIFF *tif, /* Loading pixel data */ pixels = g_new (uint32_t, layer_width * layer_height); - if (! TIFFReadRGBAImage (tif, layer_width, layer_width, pixels, 0)) + if (! TIFFReadRGBAImage (tif, layer_width, layer_height, pixels, 0)) { g_free (pixels); continue;