/* This file is part of SGI Format, a File Format plugin for Adobe Photoshop Copyright (C) 2003-9 Toby Thain, toby@telegraphics.com.au This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ enum{ SGI_HEADER_SIZE = 512, SGI_MAGIC = 0x01DA, SGI_MAGIC_LITTLEENDIAN = 0xDA01, SGI_IMAGENAME_SIZE = 80, SGI_VERBATIM = 0, SGI_RLE, RLE_COPY_FLAG = 0x80, RLE_MAX_RUN = 0x7f, SGI_NORMAL = 0, SGI_DITHERED, SGI_SCREEN, SGI_COLORMAP, }; struct sgi_header { unsigned short magic; /* iris image file magic number */ char storage; /* storage format */ char bpc; /* number of bytes per pixel channel */ unsigned short dimension; /* number of dimensions */ unsigned short xsize; /* x size in pixels */ unsigned short ysize; /* y size in pixels */ unsigned short zsize; /* number of channels */ long pixmin; /* minimum pixel value */ long pixmax; /* maximum pixel value */ char dummy; /* ignored */ char imagename[SGI_IMAGENAME_SIZE]; /* image name */ long colormap; /* colormap id */ };