added workaround for strange tmpnam() output from VS2010. turned off optimization for DCT & DFT on Win64 for VS200x (VS2010 builds it fine)

This commit is contained in:
Vadim Pisarevsky
2010-07-16 14:16:18 +00:00
parent 39baac85dd
commit 670fff5f42
7 changed files with 34 additions and 23 deletions

View File

@@ -318,6 +318,8 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
if( !decoder->setSource(buf) )
{
filename = tmpnam(fnamebuf);
if(filename[0] == '\\')
filename++;
FILE* f = fopen( filename, "wb" );
if( !f )
return 0;
@@ -425,6 +427,8 @@ bool imencode( const string& ext, const Mat& image,
{
char fnamebuf[L_tmpnam];
const char* filename = tmpnam(fnamebuf);
if(filename[0] == '\\')
filename++;
code = encoder->setDestination(filename);
CV_Assert( code );
code = encoder->write(image, params);