00001 /*************************************************************************** 00002 * Copyright (C) 1998-2008 by authors (see AUTHORS.txt ) * 00003 * * 00004 * This file is part of LuxRender. * 00005 * * 00006 * Lux Renderer is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 3 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * Lux Renderer is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00018 * * 00019 * This project is based on PBRT ; see http://www.pbrt.org * 00020 * Lux Renderer website : http://www.luxrender.net * 00021 ***************************************************************************/ 00022 00023 #ifndef LUX_IGIIO_H 00024 #define LUX_IGIIO_H 00025 // igiio.h* 00026 00027 namespace lux 00028 { 00029 00030 // Based on code from GPL Violet Tonemapper. 00031 static const int INDIGO_IMAGE_MAGIC_NUMBER = 66613373; 00032 00033 class IndigoImageHeader 00034 { 00035 public: 00036 IndigoImageHeader() {}; 00037 ~IndigoImageHeader() {}; 00038 00039 //all integers and unsigned integers are 32 bit 00040 //Byte order should be little endian (Intel byte order) 00041 int magic_number;//should be 66613373 00042 int format_version;//1 00043 double num_samples;//total num samples taken over entire image 00044 unsigned int width;//width of supersampled (large) image 00045 unsigned int height;//height of supersampled (large) image 00046 unsigned int supersample_factor;// >= 1 00047 int zipped;//boolean 00048 00049 int image_data_size;//size of image data in bytes 00050 //should be equal to width*height*12, if data is uncompressed. 00051 00052 unsigned int colour_space;//0 = XYZ 00053 unsigned char padding[5000];//padding in case i want more stuff in the header in future 00054 00055 //image data follows: 00056 //top row, then next-to-top row, etc... 00057 //left to right across the row. 00058 //3 32 bit floats per pixel. 00059 }; 00060 00061 } 00062 00063 #endif // LUX_IGGIO_H 00064