diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pngx.c | 43 | ||||
-rw-r--r-- | converter/other/pngx.h | 25 |
2 files changed, 67 insertions, 1 deletions
diff --git a/converter/other/pngx.c b/converter/other/pngx.c index 22124b2a..f9d2491f 100644 --- a/converter/other/pngx.c +++ b/converter/other/pngx.c @@ -101,3 +101,46 @@ pngx_chunkIsPresent(struct pngx * const pngxP, +void +pngx_setText(struct pngx * const pngxP, + png_textp const textP, + unsigned int const count) { + + png_set_text(pngxP->png_ptr, pngxP->info_ptr, textP, count); +} + + + +void +pngx_setIhdr(struct pngx * const pngxP, + unsigned int const width, + unsigned int const height, + unsigned int const bitDepth, + int const colorType, + int const interlaceMethod, + int const compressionMethod, + int const filterMethod) { + + png_set_IHDR(pngxP->png_ptr, pngxP->info_ptr, width, height, + bitDepth, colorType, interlaceMethod, compressionMethod, + filterMethod); +} + + + +void +pngx_writeInfo(struct pngx * const pngxP) { + + png_write_info(pngxP->png_ptr, pngxP->info_ptr); +} + + + +void +pngx_writeEnd(struct pngx * const pngxP) { + + png_write_end(pngxP->png_ptr, pngxP->info_ptr); +} + + + diff --git a/converter/other/pngx.h b/converter/other/pngx.h index 3ee8321a..f9658c58 100644 --- a/converter/other/pngx.h +++ b/converter/other/pngx.h @@ -1,6 +1,9 @@ #ifndef PNGX_H_INCLUDED #define PNGX_H_INCLUDED +#include <png.h> +#include "pm_c_util.h" + /* pngx is designed to be an extension of the PNG library to make using the PNG library easier and cleaner. */ @@ -22,9 +25,29 @@ pngx_create(struct pngx ** const pngxPP, void pngx_destroy(struct pngx * const pngxP); - bool pngx_chunkIsPresent(struct pngx * const pngxP, uint32_t const chunkType); +void +pngx_setText(struct pngx * const pngxP, + png_textp const textP, + unsigned int const count); + +void +pngx_setIhdr(struct pngx * const pngxP, + unsigned int const width, + unsigned int const height, + unsigned int const bitDepth, + int const colorType, + int const interlaceMethod, + int const compressionMethod, + int const filterMethod); + +void +pngx_writeInfo(struct pngx * const pngxP); + +void +pngx_writeEnd(struct pngx * const pngxP); + #endif |