#include <vil/file_formats/vil_jpeglib.h>
Go to the source code of this file.
Classes | |
struct | vil_jpeg_stream_destination_mgr |
this is the data source structure which allows JPEG to write to a vil_stream. More... | |
Functions | |
void | vil_jpeg_init_destination (j_compress_ptr cinfo) |
jpeg_boolean | vil_jpeg_empty_output_buffer (j_compress_ptr cinfo) |
Empty the output buffer --- called whenever buffer fills up. | |
void | vil_jpeg_term_destination (j_compress_ptr cinfo) |
Terminate destination --- called by jpeg_finish_compress after all data has been written. Usually needs to flush buffer. | |
void | vil_jpeg_stream_dst_set (j_compress_ptr cinfo, vil_stream *vs) |
Prepare for output to a vil_stream. | |
void | vil_jpeg_stream_dst_rewind (j_compress_ptr cinfo, vil_stream *vs) |
Definition in file vil_jpeg_destination_mgr.h.
jpeg_boolean vil_jpeg_empty_output_buffer | ( | j_compress_ptr | cinfo | ) |
Empty the output buffer --- called whenever buffer fills up.
In typical applications, this should write the entire output buffer (ignoring the current state of next_output_byte & free_in_buffer), reset the pointer & count to the start of the buffer, and return TRUE indicating that the buffer has been dumped.
In applications that need to be able to suspend compression due to output overrun, a FALSE return indicates that the buffer cannot be emptied now. In this situation, the compressor will return to its caller (possibly with an indication that it has not accepted all the supplied scanlines). The application should resume compression after it has made more room in the output buffer. Note that there are substantial restrictions on the use of suspension --- see the documentation.
When suspending, the compressor will back up to a convenient restart point (typically the start of the current MCU). next_output_byte & free_in_buffer indicate where the restart point will be if the current call returns FALSE. Data beyond this point will be regenerated after resumption, so do not write it out when emptying the buffer externally.
Definition at line 75 of file vil_jpeg_destination_mgr.cxx.
void vil_jpeg_init_destination | ( | j_compress_ptr | cinfo | ) |
Definition at line 39 of file vil_jpeg_destination_mgr.cxx.
void vil_jpeg_stream_dst_rewind | ( | j_compress_ptr | cinfo, |
vil_stream * | vs | ||
) |
Definition at line 138 of file vil_jpeg_destination_mgr.cxx.
void vil_jpeg_stream_dst_set | ( | j_compress_ptr | cinfo, |
vil_stream * | vs | ||
) |
Prepare for output to a vil_stream.
The caller must have already opened the stream, and is responsible for closing it after finishing compression.
Definition at line 112 of file vil_jpeg_destination_mgr.cxx.
void vil_jpeg_term_destination | ( | j_compress_ptr | cinfo | ) |
Terminate destination --- called by jpeg_finish_compress after all data has been written. Usually needs to flush buffer.
Definition at line 95 of file vil_jpeg_destination_mgr.cxx.