From 943bcac90e5e3aaee0647b070e760c0985d03d0d Mon Sep 17 00:00:00 2001 From: Clement Sibille Date: Fri, 8 Mar 2024 01:16:53 +0900 Subject: Add LisPng_write_RGBA8_data() --- lisiblepng/src/lisiblepng.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisiblepng/src/lisiblepng.h') diff --git a/lisiblepng/src/lisiblepng.h b/lisiblepng/src/lisiblepng.h index a23ac91..e7f94ec 100644 --- a/lisiblepng/src/lisiblepng.h +++ b/lisiblepng/src/lisiblepng.h @@ -24,6 +24,15 @@ typedef struct LisPng LisPng; /// The returned PNG is owned by the caller and must be destroyed with /// Png_destroy. LisPng *LisPng_decode(FILE *stream); + +/// Writes the PNG image data as RGBA8 data to a buffer +/// +/// Note: The output_data buffer must be allocated with enough memory +/// (width*height*32) +/// @param png The png +/// @param output_data The output buffer +void LisPng_write_RGBA8_data(const LisPng *png, uint8_t *output_data); + /// Outputs the provided Png struct as a PPM image to stdout /// /// @param png The png -- cgit v1.2.3