|
| JWCompress (void) |
| Constructor. More...
|
|
virtual | ~JWCompress (void) |
| Destructor. More...
|
|
virtual JWCompress & | compress (void) |
| Compress the given data. More...
|
|
virtual JWCompress & | compress_yuv422 (const uint8_t *const data, const size_t bytes_per_row) |
| Create a JPEG from 16-bit YUYV data (aka YUY2, or YUV 4:2:2 format). More...
|
|
virtual JWCompress & | set_size (const size_t width, const size_t height) |
| Set the size of the image. More...
|
|
virtual JWCompress & | set_colour (const int components=3, const J_COLOR_SPACE colour_space=JCS_RGB) |
| Set the number of colour components and the colour space. More...
|
|
virtual JWCompress & | set_default_parameters (const J_COLOR_SPACE colour_space=JCS_RGB) |
| Set usable default values for most of the optional parameters. More...
|
|
virtual JWCompress & | set_quality (const int quality=75, const bool force_baseline=true) |
| Constructs JPEG quantization tables appropriate for the indicated quality setting. More...
|
|
virtual JWCompress & | optimized_huffman_tables (void) |
| Causes the compressor to compute optimal Huffman coding tables for the image. More...
|
|
virtual JWCompress & | set_smoothing (const int smoothing=0) |
| Determine if smoothing is accessed. Zero turns it off, 100 sets the maximum amount of smoothing. More...
|
|
virtual std::string | get_filename (void) const |
| The filename used for input (decompress) or output (compress) if set via set_file(). More...
|
|
|
virtual JWCompress & | set_output_file (const std::string &filename) |
| Set the output file into which the compressed JPEG image will be stored. More...
|
|
virtual JWCompress & | set_output_file (FILE *f) |
| Set the output file into which the compressed JPEG image will be stored. More...
|
|
|
virtual JWCompress & | use_arithmetic_coding (void) |
| Arithmetic coding will usually result in marginally smaller files, but require more CPU than Huffman coding. More...
|
|
virtual JWCompress & | use_huffman_coding (void) |
| Arithmetic coding will usually result in marginally smaller files, but require more CPU than Huffman coding. More...
|
|
|
virtual JWCompress & | use_integer_slow_dct (void) |
| The FLOAT method is very slightly more accurate than the ISLOW method, but may give different results on different machines due to varying roundoff behavior. More...
|
|
virtual JWCompress & | use_integer_fast_dct (void) |
| The FLOAT method is very slightly more accurate than the ISLOW method, but may give different results on different machines due to varying roundoff behavior. More...
|
|
virtual JWCompress & | use_float_dct (void) |
| The FLOAT method is very slightly more accurate than the ISLOW method, but may give different results on different machines due to varying roundoff behavior. More...
|
|
Use JWCompress to create
.jpg files using RGB or YUV image data.
JWCompress & JWCompress::set_quality |
( |
const int |
quality = 75 , |
|
|
const bool |
force_baseline = true |
|
) |
| |
|
virtual |
Constructs JPEG quantization tables appropriate for the indicated quality setting.
The quality value is expressed on the 0..100 scale recommended by IJG. The exact mapping from quality values to tables may change in future IJG releases as more is learned about DCT quantization. If the force_baseline parameter is TRUE
, then the quantization table entries are constrained to the range 1..255 for full JPEG baseline compatibility. In the current implementation, this only makes a difference for quality settings below 25, and it effectively prevents very small/low quality files from being generated. The IJG decoder is capable of reading the non-baseline files generated at low quality settings when force_baseline is FALSE
, but other decoders may not be.
virtual JWCompress& JWCompress::use_float_dct |
( |
void |
| ) |
|
|
inlinevirtual |
The FLOAT method is very slightly more accurate than the ISLOW method, but may give different results on different machines due to varying roundoff behavior.
The integer methods should give the same results on all machines. On machines with sufficiently fast FP hardware, the floating-point method may also be the fastest. The IFAST method is considerably less accurate than the other two; its use is not recommended if high quality is a concern.
virtual JWCompress& JWCompress::use_integer_fast_dct |
( |
void |
| ) |
|
|
inlinevirtual |
The FLOAT method is very slightly more accurate than the ISLOW method, but may give different results on different machines due to varying roundoff behavior.
The integer methods should give the same results on all machines. On machines with sufficiently fast FP hardware, the floating-point method may also be the fastest. The IFAST method is considerably less accurate than the other two; its use is not recommended if high quality is a concern.
virtual JWCompress& JWCompress::use_integer_slow_dct |
( |
void |
| ) |
|
|
inlinevirtual |
The FLOAT method is very slightly more accurate than the ISLOW method, but may give different results on different machines due to varying roundoff behavior.
The integer methods should give the same results on all machines. On machines with sufficiently fast FP hardware, the floating-point method may also be the fastest. The IFAST method is considerably less accurate than the other two; its use is not recommended if high quality is a concern.