Note
For examples see the Examples section of the mentioned methods above.
public static PredefinedColorsQuantizer FromBitmapData(
IBitmapData bitmapData
)Public Shared Function FromBitmapData (
bitmapData As IBitmapData
) As PredefinedColorsQuantizerpublic:
static PredefinedColorsQuantizer^ FromBitmapData(
IBitmapData^ bitmapData
)static member FromBitmapData :
bitmapData : IBitmapData -> PredefinedColorsQuantizer If the PixelFormat of bitmapData is Format24bppRgb, Format32bppRgb, Format48bppRgb or Format96bppRgb, then this method returns the same quantizer as the Rgb888 method.
If the PixelFormat of bitmapData is Format16bppArgb1555, then this method returns the same quantizer as the Argb1555 method.
If the PixelFormat of bitmapData is Format16bppRgb565, then this method returns the same quantizer as the Rgb565 method.
If the PixelFormat of bitmapData is Format16bppRgb555, then this method returns the same quantizer as the Rgb555 method.
If the PixelFormat of bitmapData is Format8bppGrayScale, Format16bppGrayScale or Format32bppGrayScale, then this method returns the same quantizer as the Grayscale method.
If the PixelFormat of bitmapData is an indexed format, then this method returns the same quantizer as the FromCustomPalette(Palette) method using the Palette of the specified bitmapData.
If none of above and the bitmapData has been created by one of the BitmapDataFactory.CreateBitmapData methods that have a CustomBitmapDataConfig or CustomIndexedBitmapDataConfig parameter where the BackBufferIndependentPixelAccess property is , then a special quantizer is returned that produces exactly the same colors as the specified bitmapData.
Otherwise, this method returns either the same quantizer as the Argb8888 method (if the PixelFormat of bitmapData supports alpha), a grayscale quantizer for grayscale formats (with or without alpha support), or the same quantizer as returned by the Rgb888 method.