Skip to content

Commit

Permalink
Fix a bug in planar half16 formatter
Browse files Browse the repository at this point in the history
Thanks to @cgohlke for finding it
  • Loading branch information
mm2 committed Dec 12, 2023
1 parent ad55d55 commit e88056e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cmspack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e88056e

Please sign in to comment.