From 942cf44994389fdeb19e16eebec187eb41d919d4 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 8 Jan 2012 02:44:36 +0000 Subject: [PATCH] --- MagickCore/attribute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MagickCore/attribute.c b/MagickCore/attribute.c index 7bb7d99d1..0fc9cd871 100644 --- a/MagickCore/attribute.c +++ b/MagickCore/attribute.c @@ -867,7 +867,8 @@ MagickExport MagickBooleanType SetImageDepth(Image *image, traits=GetPixelChannelMapTraits(image,channel); if (traits == UndefinedPixelTrait) continue; - q[i]=ScaleAnyToQuantum(ScaleQuantumToAny(q[i],range),range); + if (channel != IndexPixelChannel) + q[i]=ScaleAnyToQuantum(ScaleQuantumToAny(q[i],range),range); } q+=GetPixelChannels(image); } -- 2.40.0