(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSBitmapImageRep 

Inherits From:	NSImageRep : NSObject 

Declared In:	appkit/NSBitmapImageRep.h 

Allocating and Initializing a New NSBitmapImageRep object 

+ (id)imageRepWithData:(NSData *)tiffData	Creates and returns an initialized NSBitmapImageRep corresponding to the first image in tiffData.
+ (NSArray *)imageRepsWithData:(NSData *)tiffData
	Creates and returns initialized NSBitmapImageRep objects for all the images in tiffData.
- (id)initWithData:(NSData *)tiffData	Initializes a newly allocated NSBitmapImageRep from the first TIFF header and image data found in tiffData. 
- (id)initWithFocusedViewRect:(NSRect)rect	Initializes the new object using data read from the image contained in the rectangle rect. 
- (id)initWithBitmapDataPlanes:(unsigned char **)planes
pixelsWide:(int)width	Initializes the new object from raw bitmap data in the
pixelsHigh:(int)height		planes data buffers. As the data is raw, the other
bitsPerSample:(int)bps		arguments specify its attributes.
samplesPerPixel:(int)spp
hasAlpha:(BOOL)alpha
isPlanar:(BOOL)config
colorSpaceName:(NSString *)colorSpaceName
bytesPerRow:(int)rowBytes
bitsPerPixel:(int)pixelBits

Getting Information about the Image 

- (int)bitsPerPixel	Returns how many bits are needed to specify one pixel. 
- (int)samplesPerPixel	Returns the number of samples (components) in the data. 
- (BOOL)isPlanar	Returns YES if in planar configuration, NO if meshed. 
- (int)numberOfPlanes	Returns the number of data planes. 
- (int)bytesPerPlane	Returns the number of bytes in each data plane. 
- (int)bytesPerRow	Returns the number of bytes in a scan line. 

Getting Image Data 

- (unsigned char *)bitmapData	Returns a pointer to the bitmap data. If the data is planar, returns a pointer to the first plane.
- (void)getBitmapDataPlanes:(unsigned char **)data
	Provides pointers to each plane of bitmap data.

Producing a TIFF Representation of the Image 

+ (NSData *)TIFFRepresentationOfImageRepsInArray:(NSArray *)anArray
	Returns a TIFF representation of the images in the specified NSArray, using the compression that's returned by getCompression:factor: (if applicable).
+ (NSData *)TIFFRepresentationOfImageRepsInArray:(NSArray *)anArray
usingCompression:(NSTIFFCompression)compressionType
factor:(float)factor	Returns a TIFF representation of the images in the specified NSArray, which are compressed using compressionType and factor. If the specified compression isn't applicable, no compression is used.
- (NSData *)TIFFRepresentation	Returns a TIFF representation of the image, using the compression that's returned by getCompression:factor: (if applicable).
- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)compressionType
 factor:(float)factor	Returns a compressed TIFF representation of the image, having the specified compression type and compression factor. If the specified compression isn't applicable, no compression is used.

Setting and Checking Compression Types 

+ (void)getTIFFCompressionTypes:(const NSTIFFCompression **)list 
count:(int *)numTypes	Returns all available compression types. 
+ (NSString *)localizedNameForTIFFCompressionType:(NSTIFFCompression)compression
	Returns the localized name for the compression type. 
- (BOOL)canBeCompressedUsing:(NSTIFFCompression)compression
	Returns YES if the image can be compressed using the specified type of compression. 
- (void)getCompression:(NSTIFFCompression *)compression 
factor:(float *)factor	Returns, in its arguments, the compression type and compression factor. 
- (void)setCompression:(NSTIFFCompression)compression 
factor:(float)factor	Sets the compression type and compression factor.