home *** CD-ROM | disk | FTP | other *** search
- /*
- NXBitmapImageRep.h
- Application Kit, Release 2.0
- Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
- */
-
- #import "NSImageRep.h"
- #import <objc/List.h>
- #import <streams/streams.h>
- #import <objc/zone.h>
- #import "obsoleteGraphics.h"
-
- typedef enum _NSTIFFCompression {
- NSTIFFCompressionNone = 1,
- NSTIFFCompressionCCITTFAX3 = 3, /* 1 bps only */
- NSTIFFCompressionCCITTFAX4 = 4, /* 1 bps only */
- NSTIFFCompressionLZW = 5,
- NSTIFFCompressionJPEG = 6,
- NSTIFFCompressionNEXT = 32766, /* Input only */
- NSTIFFCompressionPackBits = 32773,
- NSTIFFCompressionOldJPEG = 32865 /* Input only */
- } NSTIFFCompression;
-
- @interface NSBitmapImageRep : NSImageRep
- {
- unsigned int _bytesPerRow;
- unsigned short _imageNumber;
- short _colorSpace;
- struct __bitmapRepFlags {
- #ifdef __BIG_ENDIAN__
- unsigned int isPlanar:1;
- unsigned int explicitPlanes:1;
- unsigned int bitsPerPixel:8;
- unsigned int unpackedOK:1;
- unsigned int isUnpacked:1;
- unsigned int memory:2;
- unsigned int _RESERVED:2;
- #else
- unsigned int _RESERVED:2;
- unsigned int memory:2;
- unsigned int isUnpacked:1;
- unsigned int unpackedOK:1;
- unsigned int bitsPerPixel:8;
- unsigned int explicitPlanes:1;
- unsigned int isPlanar:1;
- #endif
- } _moreRepFlags;
- unsigned short _reservedB1;
- char *_fileName;
- int _reservedB2;
- unsigned char *_data;
- char *_otherName;
- unsigned short _compression;
- unsigned short _factor;
- }
-
- - initWithFocusedViewRect:(NSRect)rect;
- - initWithBitmapDataPlanes:(unsigned char **)planes pixelsWide:(int)width pixelsHigh:(int)height bitsPerSample:(int)bps samplesPerPixel:(int)spp hasAlpha:(BOOL)alpha isPlanar:(BOOL)isPlanar colorSpaceName:(NXColorSpace)colorSpace bytesPerRow:(int)rBytes bitsPerPixel:(int)pBits;
-
- + (NSArray *)imageRepsWithData:(NSData *)tiffData; /* TIFFs can contain multiple images */
-
- + (id)imageRepWithData:(NSData *)tiffData; /* Convenience of initWithData: */
- - (id)initWithData:(NSData *)tiffData;
-
-
- - (unsigned char *)bitmapData;
- - getBitmapDataPlanes:(unsigned char **)data;
- - (BOOL)isPlanar;
- - (int)samplesPerPixel;
- - (int)bitsPerPixel;
- - (int)bytesPerRow;
- - (int)bytesPerPlane;
- - (int)numberOfPlanes;
-
- - (void)getCompression:(NSTIFFCompression *)compression factor:(float *)factor;
- - (void)setCompression:(NSTIFFCompression)compression factor:(float)factor;
-
- - (NSData *)TIFFRepresentation;
- - (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp factor:(float)factor;
-
- + (void)getTIFFCompressionTypes:(const NSTIFFCompression **)list count:(int *)numTypes;
- + (NSString *)localizedNameForTIFFCompressionType:(NSString *)compression;
- - (BOOL)canBeCompressedUsing:(NSTIFFCompression)compression;
-
- + (void)setUnpackedImageDataAcceptable:(BOOL)flag;
- + (BOOL)isUnpackedImageDataAcceptable;
-
- @end
-