plug-ins: Fix building TIFF loader on big endian

A recent addition to load layers in Sketchbook TIFFs contained a typo in
code specific to big endian machines, making it fail to build there,
which wasn’t caught in CI.

In addition to this fix, use the appropriately named macro to convert
from little endian to big endian.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
This commit is contained in:
Nils Philippsen 2024-08-15 09:50:48 +02:00 committed by Alx Sa
parent b4ad767296
commit 1c3522802a
1 changed files with 2 additions and 2 deletions

View File

@ -1911,7 +1911,7 @@ load_rgba (TIFF *tif,
guint32 i;
for (i = row_start; i < row_end; i++)
buffer[i] = GUINT32_TO_LE (buffer[i]);
buffer[i] = GUINT32_FROM_LE (buffer[i]);
#endif
gegl_buffer_set (channel[0].buffer,
@ -2451,7 +2451,7 @@ load_sketchbook_layers (TIFF *tif,
/* Make sure our channels are in the right order */
for (i = row_start; i < row_end; i++)
pixels[i] = GUINT32_TO_LE (pixel[i]);
pixels[i] = GUINT32_FROM_LE (pixels[i]);
#endif
gegl_buffer_set (buffer,
GEGL_RECTANGLE (0, layer_height - row - 1,