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.
This commit is contained in:
Alx Sa 2024-08-23 01:56:38 +00:00
parent 690391b985
commit 5699102163
1 changed files with 2 additions and 2 deletions

View File

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