DOCS: Added docs to imgio and refactored some of the names and code of imgio
This commit is contained in:
+47
-6
@@ -3,27 +3,68 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
/**
|
||||
* @brief Open and Fill buffer from .ppm file
|
||||
* @param [in] file Char pointer use to locate the image to be modified lays.
|
||||
* @param [in,out] m_attr PPM pointer to store image information
|
||||
*/
|
||||
unsigned int*
|
||||
ppm_load(const char* file, PPM* m_attr);
|
||||
read_ppm(const char* file, PPM* m_attr);
|
||||
|
||||
/**
|
||||
* @brief Open and write buffer to file
|
||||
* @param [in] buf Information of pixels
|
||||
* @param [in] img PPM pointer to store image information
|
||||
* @param [in] char Name/Location for file
|
||||
*/
|
||||
int
|
||||
ppm_save(const unsigned int* buf, const PPM img, char* name);
|
||||
write_ppm(const unsigned int* buf, const PPM img, const char* name);
|
||||
|
||||
/**
|
||||
* @brief Open and Fill buffer from .jpg file
|
||||
* @details Opens a .jpg file, creates a new buffer and extracts the pixels into
|
||||
* said buffer as integers.
|
||||
* @param [in] file Char pointer use to locate the image to be modified lays.
|
||||
* @param [in,out] m_attr JPEG pointer to store image information
|
||||
*/
|
||||
unsigned int*
|
||||
jpeg_load(JPEG* m_attr);
|
||||
read_jpeg(JPEG* m_attr);
|
||||
|
||||
/**
|
||||
* @brief Open and write buffer to file
|
||||
* @param [in] buf Information of pixels
|
||||
* @param [in] attr JPEG pointer to store image information
|
||||
* @param [in] char Name/Location for file
|
||||
*/
|
||||
int
|
||||
jpeg_save(const unsigned int* src_buf, const JPEG* attr, const char* name);
|
||||
write_jpeg(const unsigned int* src_buf, const JPEG* attr, const char* name);
|
||||
|
||||
/**
|
||||
* @brief Converts PPM to JPEG
|
||||
* @param [in] in Pointer to PPM container
|
||||
*/
|
||||
void
|
||||
transcode_to_jpeg(PPM* in, JPEG* out);
|
||||
transcode_to_jpeg(PPM* in);
|
||||
|
||||
/**
|
||||
* @brief Converts JPEG to PPM
|
||||
* @param [in] in Pointer to JPEG container
|
||||
*/
|
||||
void
|
||||
transcode_to_ppm(JPEG* in, PPM* out);
|
||||
transcode_to_ppm(JPEG* in);
|
||||
|
||||
/**
|
||||
* @brief Inherits the attributes from JPEG container
|
||||
* @param [in] in Pointer to JPEG container
|
||||
* @param [in] fmt Character for type of PPM image, binary or raw
|
||||
*/
|
||||
PPM
|
||||
inherit_from_jpeg(const JPEG* in, const char fmt);
|
||||
|
||||
/**
|
||||
* @brief Inherits the attributes from PPM container
|
||||
* @param [in] in Pointer to PPM container
|
||||
*/
|
||||
JPEG
|
||||
inherit_from_ppm(const PPM* in);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user