aboutsummaryrefslogtreecommitdiff
path: root/include/lib/png.h
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-05 21:57:20 -0800
committerChristian C <cc@localhost>2025-03-05 21:57:20 -0800
commit22db7ab4cb3b2928095bd9775fb015a5e28487f6 (patch)
tree24f1d1538809795b8b356810b6b3e6fc8dc627b4 /include/lib/png.h
parent74ae06a582b7c567caf3c04e5bf5dfabf6671f31 (diff)
Save to PNG
Diffstat (limited to 'include/lib/png.h')
-rw-r--r--include/lib/png.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/lib/png.h b/include/lib/png.h
new file mode 100644
index 0000000..e7943c2
--- /dev/null
+++ b/include/lib/png.h
@@ -0,0 +1,22 @@
+#ifndef INC_LIB_PNG_H
+#define INC_LIB_PNG_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+struct pixel_t {
+ uint8_t red;
+ uint8_t green;
+ uint8_t blue;
+};
+
+struct bitmap_t {
+ struct pixel_t* image_buffer;
+ size_t width;
+ size_t height;
+};
+
+// Save bitmap to file
+void save_png(struct bitmap_t* bitmap, char* fname);
+
+#endif