summaryrefslogtreecommitdiff
path: root/image/image.hpp
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-09-12 17:25:04 +0100
committerJosé Fonseca <jfonseca@vmware.com>2013-09-12 17:25:04 +0100
commitbeda4440ab82ed4e8f7568fd5a19d8d595b748a3 (patch)
treeca5f5d018908e1db1a8dccef6927af577f6b7beb /image/image.hpp
parent16bfd14f69f131ae53b1f3d1b5af87a54d95bc38 (diff)
image: Support reading PFM images.
Diffstat (limited to 'image/image.hpp')
-rw-r--r--image/image.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/image/image.hpp b/image/image.hpp
index 1b21acd1..857e0621 100644
--- a/image/image.hpp
+++ b/image/image.hpp
@@ -126,8 +126,20 @@ readPNG(std::istream &is);
Image *
readPNG(const char *filename);
+
+struct PNMInfo
+{
+ unsigned width;
+ unsigned height;
+ unsigned channels;
+ ChannelType channelType;
+};
+
const char *
-readPNMHeader(const char *buffer, size_t size, unsigned *channels, unsigned *width, unsigned *height);
+readPNMHeader(const char *buffer, size_t size, PNMInfo &info);
+
+Image *
+readPNM(const char *buffer, size_t bufferSize);
} /* namespace image */