From 7ffad80294bd4e1366f41f154120c314079e9fb8 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 21 Jul 2023 20:59:28 +1000 Subject: [PATCH] Removed put_pixel --- src/libImaging/Access.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/libImaging/Access.c b/src/libImaging/Access.c index f00939da0..f7adbe198 100644 --- a/src/libImaging/Access.c +++ b/src/libImaging/Access.c @@ -127,15 +127,6 @@ get_pixel_32B(Imaging im, int x, int y, void *color) { /* store individual pixel */ -static void -put_pixel(Imaging im, int x, int y, const void *color) { - if (im->image8) { - im->image8[y][x] = *((UINT8 *)color); - } else { - memcpy(&im->image32[y][x], color, sizeof(INT32)); - } -} - static void put_pixel_8(Imaging im, int x, int y, const void *color) { im->image8[y][x] = *((UINT8 *)color); @@ -186,8 +177,8 @@ ImagingAccessInit() { /* populate access table */ ADD("1", get_pixel_8, put_pixel_8); ADD("L", get_pixel_8, put_pixel_8); - ADD("LA", get_pixel, put_pixel); - ADD("La", get_pixel, put_pixel); + ADD("LA", get_pixel, put_pixel_32); + ADD("La", get_pixel, put_pixel_32); ADD("I", get_pixel_32, put_pixel_32); ADD("I;16", get_pixel_16L, put_pixel_16L); ADD("I;16L", get_pixel_16L, put_pixel_16L); @@ -197,7 +188,7 @@ ImagingAccessInit() { ADD("I;32B", get_pixel_32B, put_pixel_32B); ADD("F", get_pixel_32, put_pixel_32); ADD("P", get_pixel_8, put_pixel_8); - ADD("PA", get_pixel, put_pixel); + ADD("PA", get_pixel, put_pixel_32); ADD("RGB", get_pixel_32, put_pixel_32); ADD("RGBA", get_pixel_32, put_pixel_32); ADD("RGBa", get_pixel_32, put_pixel_32);