rem: writeMemDump(image,argv[2]);
add: writeMemDump(*pImage,argv[2]);
context: int main (int argc, char **argv){  int retCode = 0;  //char defaultOutImage[] = "out.pnm";  Image image;  osg::ImageFileType *fType;    if (argc > 2)    {      fType = osg::ImageFileHandler::the().getFileType(0,argv[1]);      if (fType) {        // read as image file        fType->read(image,argv[1]);      }      else {        // read as mem dump        readMemDump(image,argv[1]);      }      fType = osg::ImageFileHandler::the().getFileType(0,argv[2]);      if (fType) {        // write as image file        fType->write(image,argv[2]);      }      else {        // read as mem dump        writeMemDump(image,argv[2]);      }    }  else    {      FLOG (("usage: %s inputimage ouputimage\n", argv[0]));      retCode = -1;    }    return retCode;}