From be83e800b87e3c6cf8653b80d174831f91cf4350 Mon Sep 17 00:00:00 2001
From: "damian.boquetec" <damian.boquete-costa@etu.hesge.ch>
Date: Wed, 11 Nov 2020 16:23:41 +0100
Subject: [PATCH] =?UTF-8?q?1=C3=A8re=20version=20des=20fichiers=20pgm.c=20?=
 =?UTF-8?q?et=20pgm.h?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pgm.c | 18 ++++++++++++++++++
 pgm.h | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/pgm.c b/pgm.c
index e69de29..2629d73 100644
--- a/pgm.c
+++ b/pgm.c
@@ -0,0 +1,18 @@
+#include "pgm.h"
+
+
+
+pgm_error pgm_read_from_file(pgm *p, char *filename){
+    
+}
+
+/*
+pgm_error pgm_write_to_file(pgm *p, char *filename);
+pgm_error pgm_negative(pgm *neg, const pgm *const orig);
+pgm_error pgm_symmetry_hori(pgm *sym, const pgm *const orig);
+pgm_error pgm_symmetry_vert(pgm *sym, const pgm *const orig);
+pgm_error pgm_symmetry_cent(pgm *sym, const pgm *const orig);
+pgm_error pgm_photomaton(pgm *photomaton, const pgm *const orig);
+pgm_error pgm_crop(pgm *crop, const pgm *const orig, int32_t x0, int32_t x1, int32_t y0, int32_t y1);
+pgm_error pmg_conv(pgm *conv, const pgm *const orig, const matrix *const kernel);
+*/
\ No newline at end of file
diff --git a/pgm.h b/pgm.h
index e69de29..bcbcfe9 100644
--- a/pgm.h
+++ b/pgm.h
@@ -0,0 +1,32 @@
+#ifndef PGM_H
+#define PGM_H
+
+#include <stdio.h>
+#include <stdlib.h> 
+#include <stdint.h> 
+#include "matrix.h"
+
+
+typedef struct _pgm{
+    int32_t max;
+    matrix pixels;
+}pgm;
+
+typedef enum _pgm_error {
+    success, failure
+}pgm_error;
+
+pgm_error pgm_read_from_file(pgm *p, char *filename);
+pgm_error pgm_write_to_file(pgm *p, char *filename);
+pgm_error pgm_negative(pgm *neg, const pgm *const orig);
+pgm_error pgm_symmetry_hori(pgm *sym, const pgm *const orig);
+pgm_error pgm_symmetry_vert(pgm *sym, const pgm *const orig);
+pgm_error pgm_symmetry_cent(pgm *sym, const pgm *const orig);
+pgm_error pgm_photomaton(pgm *photomaton, const pgm *const orig);
+pgm_error pgm_crop(pgm *crop, const pgm *const orig, int32_t x0, int32_t x1, int32_t y0, int32_t y1);
+pgm_error pmg_conv(pgm *conv, const pgm *const orig, const matrix *const kernel);
+
+
+
+
+#endif
\ No newline at end of file
-- 
GitLab