次の方法で共有


ImageConverter.ExtractPixelSection Method

Definition

Overloads

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

This method will extract a section from a 32bit or 24bit pixel buffer upconverting to 32bit opaque if necessary. Special colors Green-1 and Magenta will be translated into transparent pixels, all transparent pixels will then be made black.

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

This method will extract a section from a 32bit or 24bit pixel buffer upconverting to 32bit opaque if necessary. Colors matching one of the transparent colors will be translated into transparent pixels, all transparent pixels will then be made black.

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

This method will extract a section from a 32bit or 24bit pixel buffer upconverting to 32bit opaque if necessary. Special colors Green-1 and Magenta will be translated into transparent pixels, all transparent pixels will then be made black.

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()

Parameters

sourcePixels
Byte[]

Source pixel buffer

sourceBitsPerPixel
Int32

Pixel size of the source image

sourceStride
Int32

Width in bytes of a pixel row in the source image

sectionRect
Int32Rect

Rectangle to extract from the source image, indicates the width/heigh of the result

Returns

Byte[]

The destination pixel buffer of an image with the dimensions of the passed in rect and a stride of Width*4 (32bpp)

Applies to

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

This method will extract a section from a 32bit or 24bit pixel buffer upconverting to 32bit opaque if necessary. Colors matching one of the transparent colors will be translated into transparent pixels, all transparent pixels will then be made black.

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()

Parameters

sourcePixels
Byte[]

Source pixel buffer

sourceBitsPerPixel
Int32

Pixel size of the source image

sourceStride
Int32

Width in bytes of a pixel row in the source image

sectionRect
Int32Rect

Rectangle to extract from the source image, indicates the width/heigh of the result

transparentColors
Color[]

Array of colors that represent transparency in the source

Returns

Byte[]

The destination pixel buffer of an image with the dimensions of the passed in rect and a stride of Width*4 (32bpp)

Applies to