#include <fstream>
-namespace Image {
+namespace image {
class Image {
}
inline signed stride(void) const {
- return flipped ? -width*channels : width*channels;
+ return flipped ? -(signed)(width*channels) : width*channels;
}
bool writeBMP(const char *filename) const;
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_ */