libonion
|
#include <onion/types.h>
Functions | |
int | onion_png_response (unsigned char *image, int Bpp, int width, int height, onion_response *res) |
Writes an image data to a response object. |
int onion_png_response | ( | unsigned char * | image, |
int | Bpp, | ||
int | width, | ||
int | height, | ||
onion_response * | res | ||
) |
Writes an image data to a response object.
Writes an image data to a response object.
image | flat buffer with all pixels |
Bpp | Bytes per pixel: 1 grayscale, 2 grayscale with alpha, 3 RGB, 4 RGB with alpha. Negative if in BGR format (cairo) |
width | The width of the image |
height | The height of the image |
res | where to write the image, it sets the necessary structs |
References OCS_INTERNAL_ERROR, OCS_PROCESSED, onion_response_t::onion_response_set_header(), onion_response_t::onion_response_write_headers(), OR_SKIP_CONTENT, onion_png_data_t::res, and onion_png_data_t::sent.