aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
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/main.c
init: ppm library utilities implemented
It is not completed at all but it works well
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..242e464
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "ppm.h"
+
+int main(int argc, char *argv[])
+{
+ Image img;
+ ppm_read("images/boxes_1.ppm", &img);
+
+ printf("width: %d\n", img.width);
+ printf("height: %d\n", img.height);
+ printf("bits: %d\n", img.pixel_bits);
+ printf("data[2]: %d\n", img.data[2]);
+ return 0;
+}
Feel free to download, copy and edit any repo