diff options
| author | Clement Sibille <clements+git@lisible.xyz> | 2024-03-08 01:16:53 +0900 |
|---|---|---|
| committer | Clement Sibille <clements+git@lisible.xyz> | 2024-03-08 01:16:53 +0900 |
| commit | 943bcac90e5e3aaee0647b070e760c0985d03d0d (patch) | |
| tree | 135bb1a1a20c7655f5ecfd94ea36c82750f61f7f /lisiblepng/src/lisiblepng.h | |
| parent | 665e6155ac8b055d89cead210300ab22a91f74ff (diff) | |
Add LisPng_write_RGBA8_data()
Diffstat (limited to '')
| -rw-r--r-- | lisiblepng/src/lisiblepng.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
