X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Fimage.hpp;h=e930512f86473c89352a8990443cd9bbff40d622;hb=5b9a463db890e86b95c7ac37484704759eabc641;hp=dc53ec990ee3a19f931f5e9160269c7e0c875169;hpb=ae2b4d32ed56e3ac193cc7205aeb58082c448ce8;p=apitrace diff --git a/common/image.hpp b/common/image.hpp index dc53ec9..e930512 100644 --- a/common/image.hpp +++ b/common/image.hpp @@ -34,7 +34,7 @@ #include -namespace Image { +namespace image { class Image { @@ -78,7 +78,7 @@ public: } inline signed stride(void) const { - return flipped ? -width*channels : width*channels; + return flipped ? -(signed)(width*channels) : width*channels; } bool writeBMP(const char *filename) const; @@ -108,8 +108,10 @@ bool writePixelsToBuffer(unsigned char *pixels, Image * readPNG(const char *filename); +const char * +readPNMHeader(const char *buffer, size_t size, unsigned *channels, unsigned *width, unsigned *height); -} /* namespace Image */ +} /* namespace image */ #endif /* _IMAGE_HPP_ */