mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
Code style changes.
This commit is contained in:
+14
-9
@@ -2567,12 +2567,17 @@ static MagickBooleanType ReadUncompressedRGBAPixels(Image *image,
|
||||
}
|
||||
else if (dds_info->extFormat == DXGI_FORMAT_R10G10B10A2_UNORM)
|
||||
{
|
||||
const unsigned int pixel = ReadBlobLSBLong(image);
|
||||
const unsigned int mask10 = 0x3ff;
|
||||
SetPixelRed(image, ScaleShortToQuantum(((pixel & mask10) / 1023.0) * 65535), q);
|
||||
SetPixelBlue(image, ScaleShortToQuantum((((pixel >> 10) & mask10) / 1023.0) * 65535), q);
|
||||
SetPixelGreen(image, ScaleShortToQuantum((((pixel >> 20) & mask10) / 1023.0) * 65535), q);
|
||||
SetPixelAlpha(image, ScaleShortToQuantum((((pixel >> 30) & 3) / 3.0) * 65535), q);
|
||||
const unsigned int
|
||||
pixel=ReadBlobLSBLong(image);
|
||||
|
||||
SetPixelRed(image,ScaleShortToQuantum((unsigned short)
|
||||
((pixel & 0x3ff)/1023.0)*65535),q);
|
||||
SetPixelBlue(image,ScaleShortToQuantum((unsigned short)
|
||||
(((pixel >> 10) & 0x3ff)/1023.0)*65535),q);
|
||||
SetPixelGreen(image,ScaleShortToQuantum((unsigned short)
|
||||
(((pixel >> 20) & 0x3ff)/1023.0)*65535),q);
|
||||
SetPixelAlpha(image,ScaleShortToQuantum((unsigned short)
|
||||
(((pixel >> 30) & 3)/3.0)*65535),q);
|
||||
}
|
||||
else if (dds_info->extFormat == DXGI_FORMAT_R8G8B8A8_UNORM ||
|
||||
IsBitMask(dds_info->pixelformat,0x000000ff,0x0000ff00,0x00ff0000,0xff000000))
|
||||
@@ -2819,9 +2824,9 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception)
|
||||
}
|
||||
case DXGI_FORMAT_R10G10B10A2_UNORM:
|
||||
{
|
||||
compression = NoCompression;
|
||||
alpha_trait = BlendPixelTrait;
|
||||
decoder = ReadUncompressedRGBA;
|
||||
compression=NoCompression;
|
||||
alpha_trait=BlendPixelTrait;
|
||||
decoder=ReadUncompressedRGBA;
|
||||
break;
|
||||
}
|
||||
case DXGI_FORMAT_B8G8R8X8_UNORM:
|
||||
|
||||
Reference in New Issue
Block a user