rem: std::ofstream outs(fileName, ios::in | ios::binary );
add: std::ofstream outs(fileName, std::ios::in | std::ios::binary );
context: bool writeMemDump (osg::Image &image, const char *fileName){  bool retCode = false;  std::ofstream outs(fileName, ios::in | ios::binary );  unsigned long maxSize, dataSize;  osg::ImageFileType *fType;  osg::UChar8 * data;    fType = osg::ImageFileHandler::the().getFileType("MTD");  if (fType && outs) {    maxSize = fType->maxBufferSize(image);    data = new osg::UChar8[maxSize];    dataSize = fType->store(image, (osg::UChar8*)data );    outs.write ( reinterpret_cast<char*>(data), dataSize );    retCode = (dataSize && (dataSize <= maxSize));  }    return retCode;}