summaryrefslogtreecommitdiffstats
path: root/lisiblepng/src/lisiblepng.h
diff options
context:
space:
mode:
authorClement Sibille <clements+git@lisible.xyz>2024-03-08 01:16:53 +0900
committerClement Sibille <clements+git@lisible.xyz>2024-03-08 01:16:53 +0900
commit943bcac90e5e3aaee0647b070e760c0985d03d0d (patch)
tree135bb1a1a20c7655f5ecfd94ea36c82750f61f7f /lisiblepng/src/lisiblepng.h
parent665e6155ac8b055d89cead210300ab22a91f74ff (diff)
Add LisPng_write_RGBA8_data()
Diffstat (limited to 'lisiblepng/src/lisiblepng.h')
-rw-r--r--lisiblepng/src/lisiblepng.h9
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
Go back to lisible.xyz