39int PNGZ_AllocBytes(uint8_t*** bytes_ptr,
const unsigned rows,
const unsigned cols);
47 const unsigned rows,
const unsigned cols
51 const unsigned rows,
const unsigned cols
int PNGZ_PrintPixelIndent(const PNGZ_Pixel p, const int indent)
int PNGZ_Load(PNGZ_Image *z)
load a pngz object into memory
int PNGZ_AllocPixels(PNGZ_Pixel ***pixels_ptr, const unsigned rows, const unsigned cols)
allocate a pixel buffer.
int PNGZ_BytesToPixels(uint8_t **bytes_src, PNGZ_Pixel **pixels_dest, const unsigned rows, const unsigned cols)
pack bytes into pixels.
int PNGZ_PrintImage(const PNGZ_Image z)
print a pngz ztruct contents.
int PNGZ_FreePixels(PNGZ_Pixel **pixels, const unsigned rows)
safely free pixel buffer.
int PNGZ_PrintPixel(const PNGZ_Pixel p)
print out a single pixels rgba values in hex.
int PNGZ_Copy(const PNGZ_Image z_src, PNGZ_Image *z_dest)
copies the pixel data from one pngz to another.
int PNGZ_AllocBytes(uint8_t ***bytes_ptr, const unsigned rows, const unsigned cols)
allocate raw pixel byte buffer.
int PNGZ_PixelsToBytes(PNGZ_Pixel **pixels_src, uint8_t **bytes_dest, const unsigned rows, const unsigned cols)
unpack pixels into raw byte ptrs.
int PNGZ_LoadFrom(PNGZ_Image *z, const char *path)
load a pngz from a path directly passed into the call, just a wrapper for standard pngz_load()
int PNGZ_PrintImageIndent(const PNGZ_Image z, const int indent)
print a pngz ztruct contents.
int PNGZ_Save(const PNGZ_Image z)
write a png back out to file, wrapper for pngz_save_as()
int PNGZ_Free(PNGZ_Image *z)
free a pngz structs pixels.
int PNGZ_SaveAs(const PNGZ_Image z, const char *path)
write a png back out to file with a new name
int PNGZ_FreeBytes(uint8_t **bytes, const unsigned rows)
safely free pixel buffer.
easy png based image structure.
PNGZ_Pixel ** pixels
[height][width] pixel buffer (Y, X)
unsigned height
png height in pixels (Y domain)
const char * path
default path to load from and save to
unsigned width
png width in pixels (X domain)