51 unsigned char** bytes_src,
pixel** pixels_dest,
52 unsigned rows,
unsigned cols
55 pixel** pixels_src,
unsigned char** bytes_dest,
56 unsigned rows,
unsigned cols
int pngz_unpack_pixels(pixel **pixels_src, unsigned char **bytes_dest, unsigned rows, unsigned cols)
unpack pixels into raw byte ptrs.
int pngz_load(pngz *z)
load a pngz object into memory
int pngz_free_bytes(unsigned char **bytes, unsigned rows)
safely free pixel buffer.
unsigned char ** pngz_alloc_bytes(unsigned rows, unsigned cols)
allocate raw pixel byte buffer.
int pngz_load_from(pngz *z, char *path)
load a pngz from a path directly passed into the call, just indirectly calls the standard pngz_load()
void pngz_print_pixel_indent(pixel p, int indent)
print out a single pixels rgba values.
int pngz_save(pngz z)
write a png back out to file
void pngz_print_indent(pngz z, int indent)
print a pngz ztruct contents.
int pngz_free(pngz *z)
free a pngz structs pixels.
void pngz_print_pixel(pixel p)
print out a single pixels rgba values in hex.
int pngz_free_pixels(pixel **pixels, unsigned rows)
safely free pixel buffer.
pixel ** pngz_alloc_pixels(unsigned rows, unsigned cols)
allocate a pixel buffer.
int pngz_pack_pixels(unsigned char **bytes_src, pixel **pixels_dest, unsigned rows, unsigned cols)
pack pixels with bytes.
void pngz_print(pngz z)
print a pngz ztruct contents.
int pngz_save_as(pngz z, char *path)
write a png back out to file with a new name
unsigned char r
channel values
char * path
default path to load from and save to
pixel ** pixels
[height][width] pixel buffer