Revert "Revert "Revert 7da4b4b47a01c19f5059bea111c2edb7c2ddefd8^..HEAD""
This reverts commit f10aeefaef714547fd6baab1b67321187853df3c.
This commit is contained in:
parent
f10aeefaef
commit
476ab8cfd9
@ -153,11 +153,11 @@ void AbstractAnalysis::saveImageAnalysis(string filename)
|
|||||||
void AbstractAnalysis::saveImageSynthesis(string filename, ofxCvImage* newPixels, ofImageType newType)
|
void AbstractAnalysis::saveImageSynthesis(string filename, ofxCvImage* newPixels, ofImageType newType)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef TARGET_OSX
|
//#ifdef TARGET_OSX
|
||||||
|
|
||||||
ofSaveImage(newPixels->getPixelsRef(), _whole_file_path_synthesis+"/"+filename, OF_IMAGE_QUALITY_BEST);
|
// ofSaveImage(newPixels->getPixelsRef(), _whole_file_path_synthesis+"/"+filename, OF_IMAGE_QUALITY_BEST);
|
||||||
|
|
||||||
#elif defined(TARGET_WIN32)
|
//#elif defined(TARGET_WIN32)
|
||||||
|
|
||||||
if (newType == OF_IMAGE_COLOR){
|
if (newType == OF_IMAGE_COLOR){
|
||||||
myColorImage2.setUseTexture(false);
|
myColorImage2.setUseTexture(false);
|
||||||
@ -168,12 +168,17 @@ void AbstractAnalysis::saveImageSynthesis(string filename, ofxCvImage* newPixels
|
|||||||
|
|
||||||
if (newType == OF_IMAGE_GRAYSCALE){
|
if (newType == OF_IMAGE_GRAYSCALE){
|
||||||
myGrayImage1.setUseTexture(false);
|
myGrayImage1.setUseTexture(false);
|
||||||
myGrayImage1.setFromPixels(newPixels->getPixels(), newPixels->getWidth(), newPixels->getHeight(), OF_IMAGE_GRAYSCALE);
|
|
||||||
|
// THIS IS HOW YOU HAVE TO SAVE OUT THE GREYSCALE IMAGES on WINDOWS FOR SOME REASON --> i.e.: as an OF_IMAGE_COLOR
|
||||||
|
myGrayImage1.setFromPixels(newPixels->getPixels(), newPixels->getWidth(), newPixels->getHeight(), OF_IMAGE_COLOR);
|
||||||
|
|
||||||
|
// THIS DOESN' SEEM TO SAVE OUT IMAGES ON WINDOWS
|
||||||
|
//myGrayImage1.setFromPixels(newPixels->getPixels(), newPixels->getWidth(), newPixels->getHeight(), OF_IMAGE_GRAYSCALE);
|
||||||
myGrayImage1.saveImage(_whole_file_path_synthesis+"/"+filename);
|
myGrayImage1.saveImage(_whole_file_path_synthesis+"/"+filename);
|
||||||
myGrayImage1.clear();
|
myGrayImage1.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
_saved_filenames_synthesis.push_back(_whole_file_path_synthesis+"/"+filename);
|
_saved_filenames_synthesis.push_back(_whole_file_path_synthesis+"/"+filename);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user