diff options
| author | Clement Sibille <clements+git@lisible.xyz> | 2024-03-05 16:59:28 +0900 | 
|---|---|---|
| committer | Clement Sibille <clements+git@lisible.xyz> | 2024-03-05 16:59:28 +0900 | 
| commit | 964429c5755a83d3565d4729e1c7f41170e77b1a (patch) | |
| tree | f8e22f25359cb2ebd7fb7e5929b25dcbd6093374 | |
| parent | bb6f08f3c79efc7bb7877aca97cebd3dab8b7838 (diff) | |
Add documentation
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | lisiblepng/src/lisiblepng.h | 12 | 
2 files changed, 25 insertions, 2 deletions
@@ -1,3 +1,18 @@  # LisiblePNG - a PNG decoder  This PNG decoder is meant to be used in my other C projects. + +## Supported features + +This is a simple implementation of a PNG decoder, it currently implements the following features: +- Greyscale wihout alpha +- Truecolour without alpha, without palette +- 1 to 16 bit depth samples +- All PNG filtering methods + +## Building + +```bash  +meson setup <builddir> +meson compile -C <builddir> +``` diff --git a/lisiblepng/src/lisiblepng.h b/lisiblepng/src/lisiblepng.h index 549e0a4..2fc1204 100644 --- a/lisiblepng/src/lisiblepng.h +++ b/lisiblepng/src/lisiblepng.h @@ -3,13 +3,21 @@  #include <stdio.h> -#define LISIBLE_PNG_COMPUTE_CRC -  struct Png;  typedef struct Png Png; +/// Parses the provided PNG stream +/// +/// @param stream The PNG stream +/// @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.  Png *lis_Png_parse(FILE *stream); +/// Outputs the provided Png struct as a PPM image to stdout +/// +/// @param png The png  void lis_Png_dump_ppm(const Png *png); +/// Destroys a Png instance  void lis_Png_destroy(Png *png);  #endif // LISIBLE_PNG_H  | 
