]>
git.ipfire.org Git - thirdparty/cups.git/blob - filter/image-sgi.h
2 * "$Id: image-sgi.h 177 2006-06-21 00:20:03Z jlovell $"
4 * SGI image file format library definitions for the Common UNIX Printing
7 * Copyright 1993-2005 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Easy Software Products and are protected by Federal
11 * copyright law. Distribution and use rights are outlined in the file
12 * "LICENSE.txt" which should have been included with this file. If this
13 * file is missing or damaged please contact Easy Software Products
16 * Attn: CUPS Licensing Information
17 * Easy Software Products
18 * 44141 Airport View Drive, Suite 204
19 * Hollywood, Maryland 20636 USA
21 * Voice: (301) 373-9600
22 * EMail: cups-info@cups.org
23 * WWW: http://www.cups.org
25 * This file is subject to the Apple OS-Developed Software exception.
44 # define SGI_MAGIC 474 /* Magic number in image file */
46 # define SGI_READ 0 /* Read from an SGI image file */
47 # define SGI_WRITE 1 /* Write to an SGI image file */
49 # define SGI_COMP_NONE 0 /* No compression */
50 # define SGI_COMP_RLE 1 /* Run-length encoding */
51 # define SGI_COMP_ARLE 2 /* Agressive run-length encoding */
60 FILE *file
; /* Image file */
61 int mode
, /* File open mode */
62 bpp
, /* Bytes per pixel/channel */
63 comp
; /* Compression */
64 unsigned short xsize
, /* Width in pixels */
65 ysize
, /* Height in pixels */
66 zsize
; /* Number of channels */
67 long firstrow
, /* File offset for first row */
68 nextrow
, /* File offset for next row */
69 **table
, /* Offset table for compression */
70 **length
; /* Length table for compression */
71 unsigned short *arle_row
; /* Advanced RLE compression buffer */
72 long arle_offset
, /* Advanced RLE buffer offset */
73 arle_length
; /* Advanced RLE buffer length */
81 extern int sgiClose(sgi_t
*sgip
);
82 extern int sgiGetRow(sgi_t
*sgip
, unsigned short *row
, int y
, int z
);
83 extern sgi_t
*sgiOpen(const char *filename
, int mode
, int comp
, int bpp
,
84 int xsize
, int ysize
, int zsize
);
85 extern sgi_t
*sgiOpenFile(FILE *file
, int mode
, int comp
, int bpp
,
86 int xsize
, int ysize
, int zsize
);
87 extern int sgiPutRow(sgi_t
*sgip
, unsigned short *row
, int y
, int z
);
95 * End of "$Id: image-sgi.h 177 2006-06-21 00:20:03Z jlovell $".