summaryrefslogtreecommitdiffstats
path: root/lisiblepng/src/lisiblepng.h
diff options
context:
space:
mode:
authorClement Sibille <clements+github@lisible.xyz>2024-06-09 18:08:51 +0900
committerClement Sibille <clements+github@lisible.xyz>2024-06-09 18:08:51 +0900
commitff11942fb7abfc68e2f04350f7d0a2dde51b1d9e (patch)
tree38f5c1c074665e3b5c9727b0f6fd7e3f0c5edd60 /lisiblepng/src/lisiblepng.h
parent4c88f44d42c5aace3264bfc656ae656b6b3e7373 (diff)
Make LisPng_decode use a u8* instead of a FILE*
Diffstat (limited to '')
-rw-r--r--lisiblepng/src/lisiblepng.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisiblepng/src/lisiblepng.h b/lisiblepng/src/lisiblepng.h
index e7f94ec..5d4bb44 100644
--- a/lisiblepng/src/lisiblepng.h
+++ b/lisiblepng/src/lisiblepng.h
@@ -1,8 +1,7 @@
#ifndef LISIBLE_PNG_H
#define LISIBLE_PNG_H
-#include <stdint.h>
-#include <stdio.h>
+#include <lisiblestd/types.h>
typedef enum {
LisPngColourType_Greyscale = 0,
@@ -19,11 +18,12 @@ typedef struct LisPng LisPng;
/// Parses the provided PNG stream
///
-/// @param stream The PNG stream
+/// @param image_bytes The image data
+/// @param image_bytes_length The size of the image data
/// @returns The parsed PNG as a Png struct pointer or NULL if an error occured.
/// The returned PNG is owned by the caller and must be destroyed with
/// Png_destroy.
-LisPng *LisPng_decode(FILE *stream);
+LisPng *LisPng_decode(const u8 *image_bytes, usize image_bytes_length);
/// Writes the PNG image data as RGBA8 data to a buffer
///
Go back to lisible.xyz