Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
image_portable.hpp
Go to the documentation of this file.
1
11#ifndef IMAGE_PORTABLE
12#define IMAGE_PORTABLE
13
14#include <cmath>
15#include <cstdlib>
16#include <cstdio>
17#include <cstring>
18
27#define allocation_tableau(nom, type, nombre) \
28 if ((nom = (type *)calloc(nombre, sizeof(type))) == NULL) \
29 { \
30 printf("\n Allocation dynamique impossible pour un pointeur-tableau \n"); \
31 exit(EXIT_FAILURE); \
32 }
33
34typedef unsigned char OCTET;
35
48{
49protected:
57 static void ignorer_commentaires(FILE *f);
58 // public:
59
68 // virtual void lire_nb_lignes_colonnes_image_p(char nom_image[], int *nb_lignes, int *nb_colonnes) = 0;
69
78 // virtual void lire_image_p(char nom_image[], OCTET *pt_image, int taille_image) = 0;
79
89 // virtual void ecrire_image_p(char nom_image[], OCTET *pt_image, int nb_lignes, int nb_colonnes) = 0;
90};
91
92#endif // IMAGE
Base class for portable image formats. This class provides an interface for reading and writing porta...
Definition image_portable.hpp:48
static void ignorer_commentaires(FILE *f)
A base class for different image formats.
Definition image_portable.cpp:23
unsigned char OCTET
Definition image_portable.hpp:34