Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
image_ppm.hpp
Go to the documentation of this file.
1
10#include "image_portable.hpp"
11#include <stdlib.h>
12#include <stdio.h>
13#include <math.h>
14#include <stdint.h>
15#include <inttypes.h>
16#define __STDC_FORMAT_MACROS
17
18#ifndef IMAGE_PPM
19#define IMAGE_PPM
20
21typedef unsigned char OCTET;
22
31{
32
33public:
43 void planR(OCTET *pt_image, OCTET *src, int taille_image);
53 void planV(OCTET *pt_image, OCTET *src, int taille_image);
63 void planB(OCTET *pt_image, OCTET *src, int taille_image);
64 // inherit
65public:
75 void lire_nb_lignes_colonnes_image_p(char nom_image[], int *nb_lignes, int *nb_colonnes);
85 void lire_image_p(char nom_image[], OCTET *pt_image, int taille_image);
96 void ecrire_image_p(char nom_image[], OCTET *pt_image, int nb_lignes, int nb_colonnes);
97};
98
99#endif
Base class for portable image formats. This class provides an interface for reading and writing porta...
Definition image_portable.hpp:48
This class represents a PPM image and provides methods to read and write PPM images,...
Definition image_ppm.hpp:31
void planB(OCTET *pt_image, OCTET *src, int taille_image)
This method extracts the blue plane of the image.
Definition image_ppm.cpp:38
void lire_image_p(char nom_image[], OCTET *pt_image, int taille_image)
This method reads the image data from a file.
Definition image_ppm.cpp:70
void planV(OCTET *pt_image, OCTET *src, int taille_image)
This method extracts the green plane of the image.
Definition image_ppm.cpp:29
void planR(OCTET *pt_image, OCTET *src, int taille_image)
This method extracts the red plane of the image.
Definition image_ppm.cpp:20
void lire_nb_lignes_colonnes_image_p(char nom_image[], int *nb_lignes, int *nb_colonnes)
This method reads the number of lines and columns of the image from a file.
Definition image_ppm.cpp:47
void ecrire_image_p(char nom_image[], OCTET *pt_image, int nb_lignes, int nb_colonnes)
This method writes the image data to a file.
Definition image_ppm.cpp:97
This file defines the image_portable class, which is a base class for different image formats.
unsigned char OCTET
Definition image_ppm.hpp:21