Creates a
GrayscaleBitmap from the current
GcBitmap.
This method does not perform any transformations of the color palette. It is expected that the source GcBitmap has already been converted to grayscale palette using a GrayscaleEffect or something like that. Alternatively, you can use this method to extract individual channels of a color image without any prior conversion, and treat the resulting GrayscaleBitmap simply as a representation of some image data with 8 bits per pixel. The ToGrayscaleBitmap method just copies data from a specified color channel to a new instance of the GrayscaleBitmap class. If you need to copy some color channel to an existing instance of GrayscaleBitmap, use the ExportColorChannel method instead.
シンタックス
パラメータ
- colorChannel
- The color channel used as the source of grayscale data.
- whiteIsZero
- If true, indicates that 0 represents white and 255 represents black in the resulting GrayscaleBitmap.
戻り値の型
A new instance of
GrayscaleBitmap.
参照