From: <da...@us...> - 2007-10-24 19:28:25
|
Revision: 2489 http://hugin.svn.sourceforge.net/hugin/?rev=2489&view=rev Author: dangelo Date: 2007-10-24 12:28:24 -0700 (Wed, 24 Oct 2007) Log Message: ----------- properly added EXR output to functions querying file extensions for formats Modified Paths: -------------- hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.cpp hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.h Modified: hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.cpp =================================================================== --- hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.cpp 2007-10-24 17:25:37 UTC (rev 2488) +++ hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.cpp 2007-10-24 19:28:24 UTC (rev 2489) @@ -42,28 +42,28 @@ const std::string & PanoramaOptions::getFormatName(FileFormat f) { - assert((int)f <= (int)HDR_m); + assert((int)f <= (int)FILEFORMAT_NULL); return fileformatNames[(int) f]; } const std::string & PanoramaOptions::getOutputExtension() const { - assert((int)outputFormat <= (int)HDR_m); + assert((int)outputFormat < (int)FILEFORMAT_NULL); return fileformatExt[(int) outputFormat]; } PanoramaOptions::FileFormat PanoramaOptions::getFormatFromName(const std::string & name) { - int max = (int) HDR_m; + int max = (int) FILEFORMAT_NULL; int i; for (i=0; i<max; i++) { if (name == fileformatNames[i]) { break; } } - if (i == max) { + if (i+1 == max) { DEBUG_ERROR("could not parse format " << name ); - return TIFF; + return TIFF_m; } return (FileFormat) i; } Modified: hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.h =================================================================== --- hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.h 2007-10-24 17:25:37 UTC (rev 2488) +++ hugin/branches/ippei/src/hugin_base/panodata/PanoramaOptions.h 2007-10-24 19:28:24 UTC (rev 2489) @@ -135,7 +135,8 @@ HDR, HDR_m, EXR, - EXR_m + EXR_m, + FILEFORMAT_NULL }; /** output mode */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |