aboutsummaryrefslogtreecommitdiff
path: root/src/ppm.h
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2023-06-18 15:03:25 -0500
committerjvech <jmvalenciae@unal.edu.co>2023-06-18 15:03:25 -0500
commit3113ade53d0dd889058c7838bb19c0fa0492b410 (patch)
tree4ca9353b421fbdc9d8ead8a257c415be133315d7 /src/ppm.h
init: ppm library utilities implemented
It is not completed at all but it works well
Diffstat (limited to 'src/ppm.h')
-rw-r--r--src/ppm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ppm.h b/src/ppm.h
new file mode 100644
index 0000000..5cf8b02
--- /dev/null
+++ b/src/ppm.h
@@ -0,0 +1,15 @@
+#ifndef __PPM__
+#define __PPM__
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+typedef struct Image {
+ uint8_t *data;
+ int32_t width, height, pixel_bits;
+} Image;
+
+void ppm_read(const char *file, Image *img);
+void ppm_write(const char *file, Image *img);
+#endif
Feel free to download, copy and edit any repo