libonion
|
#include <setjmp.h>
#include <stdio.h>
#include <stddef.h>
#include <stdbool.h>
#include <jpeglib.h>
#include <onion/types_internal.h>
#include <onion/response.h>
#include <onion/log.h>
Data Structures | |
struct | onion_jpeg_data_t |
struct | onion_error_mgr |
Typedefs | |
typedef struct onion_jpeg_data_t | onion_jpeg_data |
typedef struct onion_error_mgr * | onion_error_ptr |
Functions | |
void | onion_error_exit (j_common_ptr cinfo) |
void | onion_init_destination (j_compress_ptr cinfo) |
boolean | onion_empty_output_buffer (j_compress_ptr cinfo) |
void | onion_term_destination (j_compress_ptr cinfo) |
int | onion_jpeg_response (unsigned char *image, int image_num_color_channels, J_COLOR_SPACE image_color_space, int image_width, int image_height, int output_quality, onion_response *res) |
Writes image data to a response object. |
typedef struct onion_error_mgr* onion_error_ptr |
typedef struct onion_jpeg_data_t onion_jpeg_data |
boolean onion_empty_output_buffer | ( | j_compress_ptr | cinfo | ) |
References onion_response_t::buffer, onion_response_t::buffer_pos, onion_response_flush(), onion_jpeg_data_t::res, and onion_jpeg_data_t::sent.
Referenced by onion_jpeg_response().
void onion_error_exit | ( | j_common_ptr | cinfo | ) |
void onion_init_destination | ( | j_compress_ptr | cinfo | ) |
References onion_response_t::buffer, onion_response_t::buffer_pos, and onion_jpeg_data_t::res.
Referenced by onion_jpeg_response().
int onion_jpeg_response | ( | unsigned char * | image, |
int | image_num_color_channels, | ||
J_COLOR_SPACE | image_color_space, | ||
int | image_width, | ||
int | image_height, | ||
int | output_quality, | ||
onion_response * | res | ||
) |
Writes image data to a response object.
References OCS_PROCESSED, onion_empty_output_buffer(), onion_error_exit(), onion_init_destination(), onion_response_t::onion_response_set_header(), onion_response_t::onion_response_write_headers(), onion_term_destination(), OR_SKIP_CONTENT, onion_error_mgr::pub, onion_jpeg_data_t::res, onion_jpeg_data_t::sent, and onion_error_mgr::setjmp_buffer.
void onion_term_destination | ( | j_compress_ptr | cinfo | ) |
References onion_response_t::buffer, onion_response_t::buffer_pos, onion_response_flush(), onion_jpeg_data_t::res, and onion_jpeg_data_t::sent.
Referenced by onion_jpeg_response().