Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
image_ppm Class Reference

This class represents a PPM image and provides methods to read and write PPM images, and to extract their R, G, and B planes. More...

#include <image_ppm.hpp>

Inheritance diagram for image_ppm:
Collaboration diagram for image_ppm:

Public Member Functions

void planR (OCTET *pt_image, OCTET *src, int taille_image)
 This method extracts the red plane of the image.
 
void planV (OCTET *pt_image, OCTET *src, int taille_image)
 This method extracts the green plane of the image.
 
void planB (OCTET *pt_image, OCTET *src, int taille_image)
 This method extracts the blue plane of the image.
 
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.
 
void lire_image_p (char nom_image[], OCTET *pt_image, int taille_image)
 This method reads the image data from a file.
 
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.
 

Additional Inherited Members

- Static Protected Member Functions inherited from image_portable
static void ignorer_commentaires (FILE *f)
 A base class for different image formats.
 

Detailed Description

This class represents a PPM image and provides methods to read and write PPM images, and to extract their R, G, and B planes.

Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005

Member Function Documentation

◆ ecrire_image_p()

void image_ppm::ecrire_image_p ( char nom_image[],
OCTET * pt_image,
int nb_lignes,
int nb_colonnes )

This method writes the image data to a file.

Parameters
nom_imageName of the image file.
pt_imagePointer to the image data.
nb_lignesNumber of lines in the image.
nb_colonnesNumber of columns in the image.
Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005

◆ lire_image_p()

void image_ppm::lire_image_p ( char nom_image[],
OCTET * pt_image,
int taille_image )

This method reads the image data from a file.

Parameters
nom_imageName of the image file.
pt_imagePointer to store the image data.
taille_imageSize of the image.
Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005

◆ lire_nb_lignes_colonnes_image_p()

void image_ppm::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.

Parameters
nom_imageName of the image file.
nb_lignesPointer to store the number of lines.
nb_colonnesPointer to store the number of columns.
Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005

◆ planB()

void image_ppm::planB ( OCTET * pt_image,
OCTET * src,
int taille_image )

This method extracts the blue plane of the image.

Parameters
pt_imagePointer to the image data.
srcPointer to the source data.
taille_imageSize of the image.
Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005

◆ planR()

void image_ppm::planR ( OCTET * pt_image,
OCTET * src,
int taille_image )

This method extracts the red plane of the image.

Parameters
pt_imagePointer to the image data.
srcPointer to the source data.
taille_imageSize of the image.
Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005

◆ planV()

void image_ppm::planV ( OCTET * pt_image,
OCTET * src,
int taille_image )

This method extracts the green plane of the image.

Parameters
pt_imagePointer to the image data.
srcPointer to the source data.
taille_imageSize of the image.
Authors
Katia Auxilien, William Puech
Date
May 2024, Tue Mar 31 13:26:36 2005