+
+ void writePNM(std::ostream &os, const char *comment = NULL) const;
+
+ inline bool writePNM(const char *filename, const char *comment = NULL) const {
+ std::ofstream os(filename, std::ofstream::binary);
+ if (!os) {
+ return false;
+ }
+ writePNM(os, comment);
+ return true;
+ }
+