Open
Description
The following code snippet produces an incorrectly colored saved image (e.g., all blue). It should swap color channel R and B.
std::string inputFile("testFile.bmp");
std::string outputFile("outFile.bmp");
svlSampleImageRGB inputImage;
svlSampleImageRGB outputImage;
int result = 0;
result = svlImageIO::Read(inputImage, 0, inputFile, false);
outputImage.SetSize(inputImage);
// the following does not work when original image is bmp on mac.
result = svlImageProcessing::SwapColorChannels(&inputImage, 0, &outputImage, 0);
result = svlImageIO::Write(outputImage, 0, outputFile);
The input is a colored bmp file on mac OSX 10.9, cisst is compiled with opencv support.