From e88056ef81e42cd1fe06945da9d44ac95c80fa48 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Tue, 12 Dec 2023 19:59:09 +0100 Subject: [PATCH] Fix a bug in planar half16 formatter Thanks to @cgohlke for finding it --- src/cmspack.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cmspack.c b/src/cmspack.c index ac93bcd8..5ebbd208 100644 --- a/src/cmspack.c +++ b/src/cmspack.c @@ -1078,8 +1078,7 @@ cmsINLINE cmsBool IsInkSpace(cmsUInt32Number Type) } // Return the size in bytes of a given formatter -static -cmsUInt32Number PixelSize(cmsUInt32Number Format) +cmsINLINE cmsUInt32Number PixelSize(cmsUInt32Number Format) { cmsUInt32Number fmt_bytes = T_BYTES(Format); @@ -3426,7 +3425,7 @@ cmsUInt8Number* UnrollHalfToFloat(_cmsTRANSFORM* info, cmsUInt32Number i, start = 0; cmsFloat32Number maximum = IsInkSpace(info ->InputFormat) ? 100.0F : 1.0F; - Stride /= PixelSize(info->OutputFormat); + Stride /= PixelSize(info->InputFormat); if (ExtraFirst) start = Extra;