From 9e2a3b490e34f5070fd665e491de3971350c8d74 Mon Sep 17 00:00:00 2001 From: pylee Date: Sun, 1 Sep 2024 22:08:44 -0700 Subject: [PATCH] For CPU processor, when source has no alpha but dest does make it default to 1. Signed-off-by: pylee --- src/OpenColorIO/ImagePacking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenColorIO/ImagePacking.cpp b/src/OpenColorIO/ImagePacking.cpp index 3c24c9a58f..d8290da741 100644 --- a/src/OpenColorIO/ImagePacking.cpp +++ b/src/OpenColorIO/ImagePacking.cpp @@ -70,7 +70,7 @@ void Generic::PackRGBAFromImageDesc(const GenericImageDesc & srcImg, inBitDepthBuffer[4*pixelsCopied+0] = *rPtr; inBitDepthBuffer[4*pixelsCopied+1] = *gPtr; inBitDepthBuffer[4*pixelsCopied+2] = *bPtr; - inBitDepthBuffer[4*pixelsCopied+3] = aPtr ? *aPtr : (Type)0.0f; + inBitDepthBuffer[4*pixelsCopied+3] = aPtr ? *aPtr : (Type)1.0f; pixelsCopied++; xIndex++; @@ -140,7 +140,7 @@ void Generic::PackRGBAFromImageDesc(const GenericImageDesc & srcImg, outputBuffer[4*pixelsCopied+0] = *rPtr; outputBuffer[4*pixelsCopied+1] = *gPtr; outputBuffer[4*pixelsCopied+2] = *bPtr; - outputBuffer[4*pixelsCopied+3] = aPtr ? *aPtr : 0.0f; + outputBuffer[4*pixelsCopied+3] = aPtr ? *aPtr : 1.0f; pixelsCopied++; xIndex++;