]>
git.ipfire.org Git - thirdparty/cups.git/blob - filter/image-sgi.h
2 * "$Id: image-sgi.h 6649 2007-07-11 21:46:42Z mike $"
4 * SGI image file format library definitions for the Common UNIX Printing
7 * Copyright 2007 by Apple Inc.
8 * Copyright 1993-2005 by Easy Software Products.
10 * These coded instructions, statements, and computer programs are the
11 * property of Apple Inc. and are protected by Federal copyright
12 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 * which should have been included with this file. If this file is
14 * file is missing or damaged, see the license at "http://www.cups.org/".
16 * This file is subject to the Apple OS-Developed Software exception.
35 # define SGI_MAGIC 474 /* Magic number in image file */
37 # define SGI_READ 0 /* Read from an SGI image file */
38 # define SGI_WRITE 1 /* Write to an SGI image file */
40 # define SGI_COMP_NONE 0 /* No compression */
41 # define SGI_COMP_RLE 1 /* Run-length encoding */
42 # define SGI_COMP_ARLE 2 /* Agressive run-length encoding */
51 FILE *file
; /* Image file */
52 int mode
, /* File open mode */
53 bpp
, /* Bytes per pixel/channel */
54 comp
; /* Compression */
55 unsigned short xsize
, /* Width in pixels */
56 ysize
, /* Height in pixels */
57 zsize
; /* Number of channels */
58 long firstrow
, /* File offset for first row */
59 nextrow
, /* File offset for next row */
60 **table
, /* Offset table for compression */
61 **length
; /* Length table for compression */
62 unsigned short *arle_row
; /* Advanced RLE compression buffer */
63 long arle_offset
, /* Advanced RLE buffer offset */
64 arle_length
; /* Advanced RLE buffer length */
72 extern int sgiClose(sgi_t
*sgip
);
73 extern int sgiGetRow(sgi_t
*sgip
, unsigned short *row
, int y
, int z
);
74 extern sgi_t
*sgiOpen(const char *filename
, int mode
, int comp
, int bpp
,
75 int xsize
, int ysize
, int zsize
);
76 extern sgi_t
*sgiOpenFile(FILE *file
, int mode
, int comp
, int bpp
,
77 int xsize
, int ysize
, int zsize
);
78 extern int sgiPutRow(sgi_t
*sgip
, unsigned short *row
, int y
, int z
);
86 * End of "$Id: image-sgi.h 6649 2007-07-11 21:46:42Z mike $".