public GetPixels ( |
||
info | ||
pixels | ||
colorTable | ||
colorTableCount | int | |
return | SKCodecResult |
public SKCodecResult GetPixels (SKImageInfo info, IntPtr pixels, SKColorTable colorTable, ref int colorTableCount)
{
return GetPixels (info, pixels, info.RowBytes, SKCodecOptions.Default, colorTable, ref colorTableCount);
}
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( |
|
SKCodec::GetPixels ( byte &pixels ) : SKCodecResult |
public static SKBitmap Decode(SKCodec codec, SKImageInfo bitmapInfo) { if (codec == null) { throw new ArgumentNullException(nameof(codec)); } // construct a color table for the decode if necessary SKColorTable colorTable = null; int colorCount = 0; if (bitmapInfo.ColorType == SKColorType.Index8) { colorTable = new SKColorTable(); } // read the pixels and color table var bitmap = new SKBitmap(bitmapInfo, colorTable); IntPtr length; var result = codec.GetPixels(bitmapInfo, bitmap.GetPixels(out length), colorTable, ref colorCount); if (result != SKCodecResult.Success && result != SKCodecResult.IncompleteInput) { bitmap.Dispose(); bitmap = null; } return(bitmap); }