You are expected to open/close your file-equivalent before and after There are also five equivalent functions that use an arbitrary write function. Void stbi_flip_vertically_on_write(int flag) // flag is non-zero to flip data vertically Int stbi_write_jpg(char const *filename, int w, int h, int comp, const float *data, int quality) Int stbi_write_hdr(char const *filename, int w, int h, int comp, const void *data) Int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data) Int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data) Int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes) There are five functions, one for each image file format: This library is designed for source code compactness and simplicity, not optimal image The PNG output is not optimal it is 20-50% larger than the file written by a decent optimizing implementation though providing a custom zlib compressįunction (see zlib_compress) can mitigate that. This header file is a library for writing images to C stdio. Native bindings to stb_image_write.h from the stb library.
0 Comments
Leave a Reply. |