943N/A/* Copyright (c) 1989, 1991, Oracle and/or its affiliates. All rights reserved.
803N/A *
803N/A * Permission is hereby granted, free of charge, to any person obtaining a
919N/A * copy of this software and associated documentation files (the "Software"),
919N/A * to deal in the Software without restriction, including without limitation
919N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A * and/or sell copies of the Software, and to permit persons to whom the
919N/A * Software is furnished to do so, subject to the following conditions:
803N/A *
919N/A * The above copyright notice and this permission notice (including the next
919N/A * paragraph) shall be included in all copies or substantial portions of the
919N/A * Software.
803N/A *
919N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A * DEALINGS IN THE SOFTWARE.
803N/A */
803N/A
803N/A
803N/A/*
803N/A * Description of header for files containing raster images
803N/A */
803N/A
803N/A#ifndef _rasterfile_h
803N/A#define _rasterfile_h
803N/A
803N/Astruct rasterfile {
803N/A int ras_magic; /* magic number */
803N/A int ras_width; /* width (pixels) of image */
803N/A int ras_height; /* height (pixels) of image */
803N/A int ras_depth; /* depth (1, 8, or 24 bits) of pixel */
803N/A int ras_length; /* length (bytes) of image */
803N/A int ras_type; /* type of file; see RT_* below */
803N/A int ras_maptype; /* type of colormap; see RMT_* below */
803N/A int ras_maplength; /* length (bytes) of following map */
803N/A /* color map follows for ras_maplength bytes, followed by image */
803N/A};
803N/A#define RAS_MAGIC 0x59a66a95
803N/A
803N/A /* Sun supported ras_type's */
803N/A#define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
803N/A#define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
803N/A#define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
803N/A#define RT_FORMAT_RGB 3 /* XRGB or RGB instead of XBGR or BGR */
803N/A#define RT_FORMAT_TIFF 4 /* tiff <-> standard rasterfile */
803N/A#define RT_FORMAT_IFF 5 /* iff (TAAC format) <-> standard rasterfile */
803N/A#define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
803N/A
803N/A /* Sun registered ras_maptype's */
803N/A#define RMT_RAW 2
803N/A /* Sun supported ras_maptype's */
803N/A#define RMT_NONE 0 /* ras_maplength is expected to be 0 */
803N/A#define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
803N/A
803N/A/*
803N/A * NOTES:
803N/A * Each line of the image is rounded out to a multiple of 16 bits.
803N/A * This corresponds to the rounding convention used by the memory pixrect
803N/A * package (/usr/include/pixrect/memvar.h) of the SunWindows system.
803N/A * The ras_encoding field (always set to 0 by Sun's supported software)
803N/A * was renamed to ras_length in release 2.0. As a result, rasterfiles
803N/A * of type 0 generated by the old software claim to have 0 length; for
803N/A * compatibility, code reading rasterfiles must be prepared to compute the
803N/A * true length from the width, height, and depth fields.
803N/A */
803N/A
803N/A#endif /*!_rasterfile_h*/