{"repo":"raysan5/rpng","free":true,"listed":false,"github":"https://github.com/raysan5/rpng","clone":"git clone https://github.com/raysan5/rpng.git","description":"A simple and easy-to-use library to load/save png images and manage png chunks","language":"C","stars":229,"topics":["data-structures","c","gamedev","compression","file-format","image-library","png","png-decoder","png-encoder"],"license":"Zlib","category":"game-templates","readme_excerpt":"rpng is a simple and easy-to-use library to load/save png images and manage png chunks. rpng is provided as a self-contained portable single-file header-only library with no external dependencies. Its only dependency, the standard C library, can also be replaced with a custom implementation if required. rpng implements internally the DEFLATE algorithm to allow reading and writing PNG images when required. features - Load/save png files from raw image data - Load/save png indexed data and palette - Count/read/write/remove png chunks - Operates on file or memory-buffer - Chunks data abstraction ( png chunk type) - Minimal libc usage and RPNG NO STDIO supported basic functions design notes rpng includes an advanced API to work directly on memory buffers, to avoid direct file access or allow virtual file systems. Those functions share the same signature than file functions but add a from memory() suffix and receive the memory buffer instead of the filename, some of them also return the file output size. Here an example: Note an important detail: memory functions do not receive the size of the buffer. It was a design decision. Data is validated following PNG specs (png magic number, chunks data, IEND closing chunk) but it's expected that user provides valid data. Memory functions that require writing data, return the output buffer size as a parameter: int output size and are limited in size by RPNG MAX OUTPUT SIZE definition, by default 64MB , redefine that number if dealing with ","default_branch":null,"files":null,"tree":[],"storefront":"/r/raysan5","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/raysan5/rpng/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}