summaryrefslogtreecommitdiff
path: root/bmp.h
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2018-03-31 09:57:57 +0200
committerTom Smeding <tom.smeding@gmail.com>2018-03-31 09:57:57 +0200
commit08c6f6ea50aeadb3fae94d08b76556b5e2c88543 (patch)
tree1e57f1c3ed2350c22561bc7891479edd80b94b68 /bmp.h
Initial
Diffstat (limited to 'bmp.h')
-rw-r--r--bmp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/bmp.h b/bmp.h
new file mode 100644
index 0000000..ca4c881
--- /dev/null
+++ b/bmp.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <cstdint>
+
+int64_t bmp_encoded_size(int width, int height);
+
+// src should be 3*w*h bytes
+// dst should be bmp_rgb_encoded_size(w,h) bytes
+void bmp_rgb_encode_memory(uint8_t *dst, const uint8_t *src, int width, int height);
+
+uint8_t* bmp_rgb_encode_memory_alloc(const uint8_t *src, int width, int height);
+
+void bmp_rgb_encode_file(const char *fname, const uint8_t *src, int width, int height);