HDRUtils.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class HDRUtils.h 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @date January 2009 00005 00006 @brief 00007 Utilities for reading and writing HDR, OpenEXR, and PFM high dynamic 00008 range image formats 00009 00010 @note 00011 This code is based on similar code found in exrtools, by Billy Biggs 00012 (http://scanline.ca/exrtools/) 00013 <!-------------------------------------------------------------------->**/ 00014 00015 #ifndef HDR_UTILS_H_ 00016 #define HDR_UTILS_H_ 00017 00018 #include <common/common.h> 00019 #include <string> 00020 00021 class HDRImage; 00022 class RgbaImage; 00023 class Image; 00024 00025 class HDRUtils { 00026 public: 00027 static HDRImage *loadHDR(const std::string &filename); 00028 static HDRImage *loadEXR(const std::string &filename); 00029 static HDRImage *loadPFM(const std::string &filename); 00030 00031 static bool saveHDR(const std::string &filename, const Image *image); 00032 static bool saveEXR(const std::string &filename, const Image *image); 00033 static bool savePFM(const std::string &filename, const Image *image); 00034 00035 static HDRImage *toHDRImage (const RgbaImage *image); 00036 static RgbaImage *toRgbaImage(const HDRImage *image); 00037 00038 private: 00039 static std::string _toFullName(const std::string &filename, 00040 const std::string &ext); 00041 00042 static void _warnMissingEXR(const char *function, 00043 const std::string &filename); 00044 }; 00045 00046 #endif // HDR_UTILS_H_ 00047
Generated on 28 Feb 2009 for Milton by
1.5.6