MonobjcMonobjc Documented Class Library
NSBitmapImageRep Constructor (planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName, bitmapFormat, rowBytes, pixelBits)
NamespacesMonobjc.AppKitNSBitmapImageRepNSBitmapImageRep(IntPtr, NSInteger, NSInteger, NSInteger, NSInteger, Boolean, Boolean, NSString, NSBitmapFormat, NSInteger, NSInteger)

Initializes the receiver, a newly allocated NSBitmapImageRep object, so it can render the specified image.

Original signature is '- (id)initWithBitmapDataPlanes:(unsigned char **)planes pixelsWide:(NSInteger)width pixelsHigh:(NSInteger)height bitsPerSample:(NSInteger)bps samplesPerPixel:(NSInteger)spp hasAlpha:(BOOL)alpha isPlanar:(BOOL)isPlanar colorSpaceName:(NSString *)colorSpaceName bitmapFormat:(NSBitmapFormat)bitmapFormat bytesPerRow:(NSInteger)rowBytes bitsPerPixel:(NSInteger)pixelBits'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSBitmapImageRep(
	IntPtr planes,
	NSInteger width,
	NSInteger height,
	NSInteger bps,
	NSInteger spp,
	bool alpha,
	bool isPlanar,
	NSString colorSpaceName,
	NSBitmapFormat bitmapFormat,
	NSInteger rowBytes,
	NSInteger pixelBits
)
Public Sub New ( _
	planes As IntPtr, _
	width As NSInteger, _
	height As NSInteger, _
	bps As NSInteger, _
	spp As NSInteger, _
	alpha As Boolean, _
	isPlanar As Boolean, _
	colorSpaceName As NSString, _
	bitmapFormat As NSBitmapFormat, _
	rowBytes As NSInteger, _
	pixelBits As NSInteger _
)
public:
NSBitmapImageRep(
	IntPtr planes, 
	NSInteger width, 
	NSInteger height, 
	NSInteger bps, 
	NSInteger spp, 
	bool alpha, 
	bool isPlanar, 
	NSString^ colorSpaceName, 
	NSBitmapFormat bitmapFormat, 
	NSInteger rowBytes, 
	NSInteger pixelBits
)
Parameters
planes (IntPtr)
An array of character pointers, each of which points to a buffer containing raw image data. If the data is in planar configuration, each buffer holds one component—one plane—of the data. Color planes are arranged in the standard order—for example, red before green before blue for RGB color. All color planes precede the coverage plane. If a coverage plane exists, the bitmap’s color components must be premultiplied with it. If the data is in meshed configuration (that is, isPlanar is NO), only the first buffer is read.
width (NSInteger)
The width of the image in pixels. This value must be greater than 0.
height (NSInteger)
The height of the image in pixels. This value must be greater than 0.
bps (NSInteger)
The number of bits used to specify one pixel in a single component of the data. All components are assumed to have the same bits per sample. bps should be one of these values: 1, 2, 4, 8, 12, or 16.
spp (NSInteger)
The number of data components, or samples per pixel. This value includes both color components and the coverage component (alpha), if present. Meaningful values range from 1 through 5. An image with cyan, magenta, yellow, and black (CMYK) color components plus a coverage component would have an spp of 5; a grayscale image that lacks a coverage component would have an spp of 1.
alpha (Boolean)
YES if one of the components counted in the number of samples per pixel (spp) is a coverage (alpha) component, and NO if there is no coverage component. If YES, the color components in the bitmap data must be premultiplied with their coverage component.
isPlanar (Boolean)
YES if the data components are laid out in a series of separate “planes” or channels (“planar configuration”) and NO if component values are interwoven in a single channel (“meshed configuration”). If NO, only the first buffer of planes is read.
colorSpaceName (NSString)
A string constant that indicates how data values are to be interpreted. It should be one of the following values:
bitmapFormat (NSBitmapFormat)
An integer that specifies the ordering of the bitmap components. It is a mask created by combining the NSBitmapFormat constants NSAlphaFirstBitmapFormat, NSAlphaNonpremultipliedBitmapFormat and NSFloatingPointSamplesBitmapFormat using the C bitwise OR operator.
rowBytes (NSInteger)
The number of bytes that are allocated for each scan line in each plane of data. A scan line is a single row of pixels spanning the width of the image.
pixelBits (NSInteger)
This integer value informs NSBitmapImageRep how many bits are actually allocated per pixel in each plane of data. If the data is in planar configuration, this normally equals bps (bits per sample). If the data is in meshed configuration, it normally equals bps times spp (samples per pixel). However, it’s possible for a pixel specification to be followed by some meaningless bits (empty space), as may happen, for example, if pixel data is aligned on byte boundaries. NSBitmapImageRep supports only a limited number of pixelBits values (other than the default): for RGB images with 4 bps, pixelBits may be 16; for RGB images with 8 bps, pixelBits may be 32. The legal values for pixelBits are system dependent.
Return Value
An initialized NSBitmapImageRep object or nil if the object cannot be initialized.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)