X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=image%2Fimage.hpp;h=6b32f27df699f0abb49ec8e2b2130cbec6de19e7;hb=08473e50e90059e75d6e7bce7e12be8bf6dd028b;hp=11bfc63c6c48c3189f09fe70df6e8ff5232af7ed;hpb=90808c138de511a81b6b85d22a9400007d91336b;p=apitrace diff --git a/image/image.hpp b/image/image.hpp index 11bfc63..6b32f27 100644 --- a/image/image.hpp +++ b/image/image.hpp @@ -31,7 +31,7 @@ #define _IMAGE_HPP_ -#include +#include namespace image { @@ -81,45 +81,26 @@ public: return flipped ? -(signed)(width*channels) : width*channels; } - bool writeBMP(const char *filename) const; + bool + writeBMP(const char *filename) const; - void writePNM(std::ostream &os, const char *comment = NULL) const; + 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; - } + bool + writePNM(const char *filename, const char *comment = NULL) const; bool writePNG(std::ostream &os) const; - inline bool - writePNG(const char *filename) const { - std::ofstream os(filename, std::ofstream::binary); - if (!os) { - return false; - } - return writePNG(os); - } + bool + writePNG(const char *filename) const; void writeRAW(std::ostream &os) const; - inline bool - writeRAW(const char *filename) const { - std::ofstream os(filename, std::ofstream::binary); - if (!os) { - return false; - } - writeRAW(os); - return true; - } - - double compare(Image &ref); + bool + writeRAW(const char *filename) const; };