home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / NSBitmapImageRep.h < prev    next >
Text File  |  1994-09-29  |  3KB  |  89 lines

  1. /*
  2.     NXBitmapImageRep.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "NSImageRep.h"
  8. #import <objc/List.h>
  9. #import <streams/streams.h>
  10. #import <objc/zone.h>
  11. #import "obsoleteGraphics.h"
  12.  
  13. typedef enum _NSTIFFCompression {
  14.     NSTIFFCompressionNone        = 1,
  15.     NSTIFFCompressionCCITTFAX3        = 3,        /* 1 bps only */
  16.     NSTIFFCompressionCCITTFAX4        = 4,        /* 1 bps only */
  17.     NSTIFFCompressionLZW        = 5,
  18.     NSTIFFCompressionJPEG        = 6,
  19.     NSTIFFCompressionNEXT        = 32766,    /* Input only */
  20.     NSTIFFCompressionPackBits        = 32773,
  21.     NSTIFFCompressionOldJPEG        = 32865        /* Input only */
  22. } NSTIFFCompression;
  23.  
  24. @interface NSBitmapImageRep : NSImageRep
  25. {
  26.     unsigned int        _bytesPerRow;
  27.     unsigned short      _imageNumber;
  28.     short        _colorSpace;
  29.     struct __bitmapRepFlags {
  30. #ifdef __BIG_ENDIAN__
  31.     unsigned int isPlanar:1;
  32.     unsigned int explicitPlanes:1;
  33.     unsigned int bitsPerPixel:8;    
  34.     unsigned int unpackedOK:1;
  35.     unsigned int isUnpacked:1;
  36.     unsigned int memory:2;
  37.     unsigned int _RESERVED:2;
  38. #else
  39.     unsigned int _RESERVED:2;
  40.     unsigned int memory:2;
  41.     unsigned int isUnpacked:1;
  42.     unsigned int unpackedOK:1;
  43.     unsigned int bitsPerPixel:8;
  44.     unsigned int explicitPlanes:1;
  45.     unsigned int isPlanar:1;
  46. #endif
  47.     }                   _moreRepFlags;
  48.     unsigned short      _reservedB1;
  49.     char               *_fileName;
  50.     int            _reservedB2;
  51.     unsigned char      *_data;
  52.     char           *_otherName;
  53.     unsigned short      _compression;
  54.     unsigned short      _factor;
  55. }
  56.  
  57. - initWithFocusedViewRect:(NSRect)rect;
  58. - 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;
  59.  
  60. + (NSArray *)imageRepsWithData:(NSData *)tiffData;    /* TIFFs can contain multiple images */
  61.  
  62. + (id)imageRepWithData:(NSData *)tiffData;    /* Convenience of initWithData: */
  63. - (id)initWithData:(NSData *)tiffData;
  64.  
  65.  
  66. - (unsigned char *)bitmapData;
  67. - getBitmapDataPlanes:(unsigned char **)data;
  68. - (BOOL)isPlanar;
  69. - (int)samplesPerPixel;
  70. - (int)bitsPerPixel;
  71. - (int)bytesPerRow;
  72. - (int)bytesPerPlane;
  73. - (int)numberOfPlanes;
  74.  
  75. - (void)getCompression:(NSTIFFCompression *)compression factor:(float *)factor;
  76. - (void)setCompression:(NSTIFFCompression)compression factor:(float)factor;
  77.  
  78. - (NSData *)TIFFRepresentation;
  79. - (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp factor:(float)factor;
  80.  
  81. + (void)getTIFFCompressionTypes:(const NSTIFFCompression **)list count:(int *)numTypes;
  82. + (NSString *)localizedNameForTIFFCompressionType:(NSString *)compression;
  83. - (BOOL)canBeCompressedUsing:(NSTIFFCompression)compression;
  84.  
  85. + (void)setUnpackedImageDataAcceptable:(BOOL)flag;
  86. + (BOOL)isUnpackedImageDataAcceptable;
  87.  
  88. @end
  89.