alpha = 17U * (unsigned char) ((a0 >> (4*(4*j+i))) & 0xf);
else
alpha = 17U * (unsigned char) ((a1 >> (4*(4*(j-2)+i))) & 0xf);
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
- (255-alpha)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ alpha));
q++;
}
}
alpha = 255;
else
alpha = (((6-alpha_code) * a0 + (alpha_code-1) * a1) / 5);
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
- (255-alpha)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ alpha));
q++;
}
}
ReadBlobByte(image)));
SetRedPixelComponent(q,ScaleCharToQuantum((unsigned char)
ReadBlobByte(image)));
- SetOpacityPixelComponent(q,ScaleCharToQuantum((unsigned char)
- (255-ReadBlobByte(image))));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ ReadBlobByte(image)));
q++;
}
SetRedPixelComponent(q,ScaleCharToQuantum(*graydata));
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(
- (unsigned char) (255-inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum((unsigned char)
+ inLayerInfo->opacity));
graydata++;
q++;
}
SetRedPixelComponent(q,ScaleCharToQuantum(xcfdata->red));
SetGreenPixelComponent(q,ScaleCharToQuantum(xcfdata->green));
SetBluePixelComponent(q,ScaleCharToQuantum(xcfdata->blue));
- SetOpacityPixelComponent(q,xcfdata->opacity == 0U ?
- TransparentOpacity : ScaleCharToQuantum((unsigned char) (255-
- inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,xcfdata->opacity == 0U ? OpaqueOpacity :
+ ScaleCharToQuantum((unsigned char) inLayerInfo->opacity));
xcfdata++;
q++;
}
{
SetGreenPixelComponent(q,ScaleCharToQuantum(data));
SetBluePixelComponent(q,ScaleCharToQuantum(data));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(
- (unsigned char) (255-inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ (unsigned char) inLayerInfo->opacity));
}
else
{
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(
- (unsigned char) (255-inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ (unsigned char) inLayerInfo->opacity));
}
break;
}
}
case 3:
{
- SetOpacityPixelComponent(q,data == 0 ? TransparentOpacity :
- ScaleCharToQuantum((unsigned char) (255-
- inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,data == 0 ? OpaqueOpacity :
+ ScaleCharToQuantum((unsigned char) inLayerInfo->opacity));
break;
}
}
{
SetGreenPixelComponent(q,ScaleCharToQuantum(data));
SetBluePixelComponent(q,ScaleCharToQuantum(data));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(
- (unsigned char) (255-inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ (unsigned char) inLayerInfo->opacity));
}
else
{
SetGreenPixelComponent(q,GetRedPixelComponent(q));
SetBluePixelComponent(q,GetRedPixelComponent(q));
- SetOpacityPixelComponent(q,ScaleCharToQuantum(
- (unsigned char) (255-inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,ScaleCharToQuantum(
+ (unsigned char) inLayerInfo->opacity));
}
break;
}
}
case 3:
{
- SetOpacityPixelComponent(q,data == 0 ? TransparentOpacity :
- ScaleCharToQuantum((unsigned char) (255-
- inLayerInfo->opacity)));
+ SetAlphaPixelComponent(q,data == 0 ? OpaqueOpacity :
+ ScaleCharToQuantum((unsigned char) inLayerInfo->opacity));
break;
}
}