home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
OpenStepConversion
/
IntermediateFrameworks3
/
AppKit.framework
/
Headers
/
tiff.h
< prev
next >
Wrap
Text File
|
1994-11-15
|
2KB
|
70 lines
/*
tiff.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import <streams/streams.h>
#define NX_PAGEHEIGHT 2048
#define NX_BIGENDIAN 0
#define NX_LITTLEENDIAN 1
/* TIFF errors */
#define NX_BAD_TIFF_FORMAT 1
#define NX_IMAGE_NOT_FOUND 2
#define NX_ALLOC_ERROR 3
#define NX_FORMAT_NOT_YET_SUPPORTED 4
#define NX_FILE_IO_ERROR 5
#define NX_COMPRESSION_NOT_YET_SUPPORTED 6
#define NX_TIFF_CANT_APPEND 7
/* Compression values. */
#define NSTIFFCompressionNone 1
#define NSTIFFCompressionCCITTFAX3 3 /* 1 bps only */
#define NSTIFFCompressionCCITTFAX4 4 /* 1 bps only */
#define NSTIFFCompressionLZW 5
#define NSTIFFCompressionJPEG 6
#define NSTIFFCompressionNEXT 32766 /* Input only */
#define NSTIFFCompressionPackBits 32773
#define NSTIFFCompressionOldJPEG 32865 /* Input only */
/*
* Structures used with the 1.0 TIFF read/write routines.
* 2.0 and 3.0 applications should use the NXBitmapImageRep class.
*/
typedef struct _NXImageInfo {
int width; /* image width in pixels */
int height; /* image height in pixels */
int bitsPerSample; /* number of bits per data channel */
int samplesPerPixel; /* number of channels per pixel */
int planarConfig; /* NX_MESHED for mixed data channels */
/* NX_PLANAR for separate data planes */
int photoInterp; /* photometric interpretation of bitmap data, */
/* formed by ORing the constants NX_ALPHAMASK, */
/* NX_COLORMASK, and NX_MONOTONICMASK. */
} NXImageInfo;
typedef struct _NXTIFFInfo {
int imageNumber;
NXImageInfo image;
int subfileType;
int rowsPerStrip;
int stripsPerImage;
int compression; /* compression id */
int numImages; /* number of images in tiff */
int endian; /* either NX_BIGENDIAN or NX_LITTLEENDIAN */
int version; /* tiff version */
int error;
int firstIFD; /* offset of first IFD entry */
unsigned int stripOffsets[NX_PAGEHEIGHT];
unsigned int stripByteCounts[NX_PAGEHEIGHT];
} NXTIFFInfo;
extern int NSGetTIFFInfo(int imageNumber, NXStream *s, NXTIFFInfo *info);
extern void *NSReadTIFF(int imageNumber, NXStream *s, NXTIFFInfo *info, void *data);
extern void NSWriteTIFF(NXStream *s, NXImageInfo *image, void *data);