aboutsummaryrefslogtreecommitdiff
path: root/src/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/image.h b/src/image.h
new file mode 100644
index 0000000..1a9aeae
--- /dev/null
+++ b/src/image.h
@@ -0,0 +1,20 @@
+#ifndef IMAGE_H
+#define IMAGE_H
+
+#if defined(USE_LIBPNG)
+#include <png.h>
+#elif defined(USE_LODEPNG)
+#include "lodepng.h"
+#else
+#error "No png implementation"
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+
+// API structured after lodepng API
+
+unsigned decode32(uint32_t** out, unsigned* w, unsigned* h, unsigned char* in, size_t insize);
+unsigned encode32_file(const char* filename, const uint32_t* image, unsigned w, unsigned h);
+
+#endif \ No newline at end of file