"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/matlab/pfs_transform_colorspace.cpp" between
pfstools-2.1.0.tgz and pfstools-2.2.0.tgz

About: pfstools are a set of command line programs (and one GUI program) for reading, writing, manipulating, and viewing high-dynamic range (HDR) images and video frames (similar as the netpbm package does for low-dynamic range images).

pfs_transform_colorspace.cpp  (pfstools-2.1.0.tgz):pfs_transform_colorspace.cpp  (pfstools-2.2.0.tgz)
skipping to change at line 36 skipping to change at line 36
*/ */
#include "compatibility.h" #include "compatibility.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sstream>
#include "mex.h" #include "mex.h"
#include "mex_utils.h" #include "mex_utils.h"
#define SCRIPT_NAME "pfs_transform_colorspace" #define SCRIPT_NAME "pfs_transform_colorspace"
#define error mexErrMsgTxt #define error mexErrMsgTxt
#include <pfs.h> #include <pfs.h>
#include <config.h> #include <config.h>
skipping to change at line 108 skipping to change at line 110
} else if( nlhs == 1 ) { } else if( nlhs == 1 ) {
mwSize dims[] = { (mwSize)rows, (mwSize)cols, 3 }; mwSize dims[] = { (mwSize)rows, (mwSize)cols, 3 };
plhs[0] = mxCreateNumericArray( 3, dims, mxDEFAULT_ARRAY_ CLASS, mxREAL ); plhs[0] = mxCreateNumericArray( 3, dims, mxDEFAULT_ARRAY_ CLASS, mxREAL );
copy_pfsarray_to_mex( &c1Buf, &c2Buf, &c3Buf, plhs[0] ); copy_pfsarray_to_mex( &c1Buf, &c2Buf, &c3Buf, plhs[0] );
} }
} }
catch( pfs::Exception ex ) catch( pfs::Exception ex )
{ {
char error_message[100]; std::stringstream error_message;
sprintf( error_message, "%s: %s", SCRIPT_NAME, ex.getMessage() );
error( error_message ); error_message << SCRIPT_NAME << ": " << ex.getMessage();
error( error_message.str().c_str() );
} }
} }
static pfs::ColorSpace findColorSpace( const char *name ) static pfs::ColorSpace findColorSpace( const char *name )
{ {
if( !strcasecmp( name, "XYZ" ) ) return pfs::CS_XYZ; if( !strcasecmp( name, "XYZ" ) ) return pfs::CS_XYZ;
else if( !strcasecmp( name, "RGB" ) ) return pfs::CS_RGB; else if( !strcasecmp( name, "RGB" ) ) return pfs::CS_RGB;
else if( !strcasecmp( name, "SRGB" ) ) return pfs::CS_SRGB; else if( !strcasecmp( name, "SRGB" ) ) return pfs::CS_SRGB;
else if( !strcasecmp( name, "YUV" ) ) return pfs::CS_YUV; else if( !strcasecmp( name, "YUV" ) ) return pfs::CS_YUV;
else if( !strcasecmp( name, "YXY" ) ) return pfs::CS_Yxy; else if( !strcasecmp( name, "YXY" ) ) return pfs::CS_Yxy;
 End of changes. 2 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)