source: trunk/src/testing/app/bitplay/libimg/rasterfile.h @ 4

Revision 4, 3.6 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

  • Property svn:executable set to *
Line 
1/******************************************************************************
2 * SAGE - Scalable Adaptive Graphics Environment
3 *
4 * Copyright (C) 2004 Electronic Visualization Laboratory,
5 * University of Illinois at Chicago
6 *
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above
15 *    copyright notice, this list of conditions and the following disclaimer
16 *    in the documentation and/or other materials provided with the distribution.
17 *  * Neither the name of the University of Illinois at Chicago nor
18 *    the names of its contributors may be used to endorse or promote
19 *    products derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * Direct questions, comments etc about SAGE to http://www.evl.uic.edu/cavern/forum/
34 *
35 *****************************************************************************/
36
37/*      @(#)rasterfile.h 1.1 86/07/07 SMI       */
38
39/*
40 * Description of header for files containing raster images
41 */
42struct rasterfile {
43        int     ras_magic;              /* magic number */
44        int     ras_width;              /* width (pixels) of image */
45        int     ras_height;             /* height (pixels) of image */
46        int     ras_depth;              /* depth (1, 8, or 24 bits) of pixel */
47        int     ras_length;             /* length (bytes) of image */
48        int     ras_type;               /* type of file; see RT_* below */
49        int     ras_maptype;            /* type of colormap; see RMT_* below */
50        int     ras_maplength;          /* length (bytes) of following map */
51        /* color map follows for ras_maplength bytes, followed by image */
52};
53#define RAS_MAGIC       0x59a66a95
54
55        /* Sun supported ras_type's */
56#define RT_OLD          0       /* Raw pixrect image in 68000 byte order */
57#define RT_STANDARD     1       /* Raw pixrect image in 68000 byte order */
58#define RT_BYTE_ENCODED 2       /* Run-length compression of bytes */
59#define RT_EXPERIMENTAL 0xffff  /* Reserved for testing */
60
61        /* Sun registered ras_maptype's */
62#define RMT_RAW         2
63        /* Sun supported ras_maptype's */
64#define RMT_NONE        0       /* ras_maplength is expected to be 0 */
65#define RMT_EQUAL_RGB   1       /* red[ras_maplength/3],green[],blue[] */
66
67/*
68 * NOTES:
69 *      Each line of the image is rounded out to a multiple of 16 bits.
70 *   This corresponds to the rounding convention used by the memory pixrect
71 *   package (/usr/include/pixrect/memvar.h) of the SunWindows system.
72 *      The ras_encoding field (always set to 0 by Sun's supported software)
73 *   was renamed to ras_length in release 2.0.  As a result, rasterfiles
74 *   of type 0 generated by the old software claim to have 0 length; for
75 *   compatibility, code reading rasterfiles must be prepared to compute the
76 *   true length from the width, height, and depth fields.
77 */
Note: See TracBrowser for help on using the repository browser.