diff --git a/pgm.c b/pgm.c index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2629d73ef376dee72095c1827b4210d99a3ecb0c 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bcbcfe9ae85e03e59e9eb41a2a823aadebc3f13c 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