ImageConverter.ExtractPixelSection 方法

定义

重载

ExtractPixelSection(Byte[], Int32, Int32, Int32Rect)

如果需要,此方法将从32位或24bit 像素缓冲区 upconverting 到32位不透明的部分提取部分。 绿色-1 和洋红色的特殊颜色会转换为透明像素,所有透明像素都会变为黑色。

ExtractPixelSection(Byte[], Int32, Int32, Int32Rect, Color[])

如果需要,此方法将从32位或24bit 像素缓冲区 upconverting 到32位不透明的部分提取部分。 匹配其中一个透明色的颜色将转换为透明像素,所有透明像素都将变为黑色。

ExtractPixelSection(Byte[], Int32, Int32, Int32Rect)

如果需要,此方法将从32位或24bit 像素缓冲区 upconverting 到32位不透明的部分提取部分。 绿色-1 和洋红色的特殊颜色会转换为透明像素,所有透明像素都会变为黑色。

public:
 static cli::array <System::Byte> ^ ExtractPixelSection(cli::array <System::Byte> ^ sourcePixels, int sourceBitsPerPixel, int sourceStride, System::Windows::Int32Rect sectionRect);
public static byte[] ExtractPixelSection (byte[] sourcePixels, int sourceBitsPerPixel, int sourceStride, System.Windows.Int32Rect sectionRect);
static member ExtractPixelSection : byte[] * int * int * System.Windows.Int32Rect -> byte[]
Public Shared Function ExtractPixelSection (sourcePixels As Byte(), sourceBitsPerPixel As Integer, sourceStride As Integer, sectionRect As Int32Rect) As Byte()

参数

sourcePixels
Byte[]

源像素缓冲区

sourceBitsPerPixel
Int32

源图像的像素大小

sourceStride
Int32

源图像中像素行的宽度(以字节为单位)

sectionRect
Int32Rect

要从源图像中提取的矩形,指示结果的宽度/heigh

返回

Byte[]

图像的目标像素缓冲区,其中的维度传入了 rect 并使用宽度 * 4 (32bpp)

适用于

ExtractPixelSection(Byte[], Int32, Int32, Int32Rect, Color[])

如果需要,此方法将从32位或24bit 像素缓冲区 upconverting 到32位不透明的部分提取部分。 匹配其中一个透明色的颜色将转换为透明像素,所有透明像素都将变为黑色。

public:
 static cli::array <System::Byte> ^ ExtractPixelSection(cli::array <System::Byte> ^ sourcePixels, int sourceBitsPerPixel, int sourceStride, System::Windows::Int32Rect sectionRect, cli::array <System::Drawing::Color> ^ transparentColors);
public static byte[] ExtractPixelSection (byte[] sourcePixels, int sourceBitsPerPixel, int sourceStride, System.Windows.Int32Rect sectionRect, System.Drawing.Color[] transparentColors);
static member ExtractPixelSection : byte[] * int * int * System.Windows.Int32Rect * System.Drawing.Color[] -> byte[]
Public Shared Function ExtractPixelSection (sourcePixels As Byte(), sourceBitsPerPixel As Integer, sourceStride As Integer, sectionRect As Int32Rect, transparentColors As Color()) As Byte()

参数

sourcePixels
Byte[]

源像素缓冲区

sourceBitsPerPixel
Int32

源图像的像素大小

sourceStride
Int32

源图像中像素行的宽度(以字节为单位)

sectionRect
Int32Rect

要从源图像中提取的矩形,指示结果的宽度/heigh

transparentColors
Color[]

表示源中透明度的颜色数组

返回

Byte[]

图像的目标像素缓冲区,其中的维度传入了 rect 并使用宽度 * 4 (32bpp)

适用于