Transverse transpose image (flip/mirror along upper right to lower left
axis.) This transform is imperfect if there are any partial iMCUs in the
image (see #TJXOPT_PERFECT.)
Allocate a byte buffer for use with TurboJPEG. You should always use this
function to allocate the JPEG destination buffer(s) for the compression and
transform functions unless you are disabling automatic buffer (re)allocation
(by setting #TJPARAM_NOREALLOC.)
Compress a packed-pixel RGB, grayscale, or CMYK image with 13 to 16 bits of
data precision per sample into a lossless JPEG image with the same data
precision.
Decode an 8-bit-per-sample unified planar YUV image into an 8-bit-per-sample
packed-pixel RGB or grayscale image. This function performs color
conversion (which is accelerated in the libjpeg-turbo implementation) but
does not execute any of the other steps in the JPEG decompression process.
Decode a set of 8-bit-per-sample Y, U (Cb), and V (Cr) image planes into an
8-bit-per-sample packed-pixel RGB or grayscale image. This function
performs color conversion (which is accelerated in the libjpeg-turbo
implementation) but does not execute any of the other steps in the JPEG
decompression process.
Decompress a JPEG image with 2 to 8 bits of data precision per sample into a
packed-pixel RGB, grayscale, or CMYK image with the same data precision.
The @ref TJPARAM “parameters” that describe the JPEG image will be set when
this function returns.
Decompress a lossless JPEG image with 13 to 16 bits of data precision per
sample into a packed-pixel RGB, grayscale, or CMYK image with the same
data precision.
Retrieve information about a JPEG image without decompressing it, or prime
the decompressor with quantization and Huffman tables. If a JPEG image is
passed to this function, then the @ref TJPARAM “parameters” that describe
the JPEG image will be set when the function returns. If a JPEG image is
passed to this function and #TJPARAM_SAVEMARKERS is set to 2 or 4, then
the ICC profile (if any) will be extracted from the JPEG image.
(#tj3GetICCProfile() can then be used to retrieve the profile.)
Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample unified
planar YUV image. This function performs JPEG decompression but leaves out
the color conversion step, so a planar YUV image is generated instead of a
packed-pixel image. The @ref TJPARAM “parameters” that describe the JPEG
image will be set when this function returns.
Decompress an 8-bit-per-sample JPEG image into separate 8-bit-per-sample Y,
U (Cb), and V (Cr) image planes. This function performs JPEG decompression
but leaves out the color conversion step, so a planar YUV image is generated
instead of a packed-pixel image. The @ref TJPARAM “parameters” that
describe the JPEG image will be set when this function returns.
Encode an 8-bit-per-sample packed-pixel RGB or grayscale image into an
8-bit-per-sample unified planar YUV image. This function performs color
conversion (which is accelerated in the libjpeg-turbo implementation) but
does not execute any of the other steps in the JPEG compression process.
Encode an 8-bit-per-sample packed-pixel RGB or grayscale image into separate
8-bit-per-sample Y, U (Cb), and V (Cr) image planes. This function performs
color conversion (which is accelerated in the libjpeg-turbo implementation)
but does not execute any of the other steps in the JPEG compression process.
Free a byte buffer previously allocated by TurboJPEG. You should always use
this function to free JPEG destination buffer(s) that were automatically
(re)allocated by the compression and transform functions or that were
manually allocated using #tj3Alloc().
The maximum size of the buffer (in bytes) required to hold a JPEG image with
the given parameters. The number of bytes returned by this function is
larger than the size of the uncompressed source image. The reason for this
is that the JPEG format uses 16-bit coefficients, so it is possible for a
very high-quality source image with very high-frequency content to expand
rather than compress when converted to the JPEG format. Such images
represent very rare corner cases, but since there is no way to predict the
size of a JPEG image prior to compression, the corner cases have to be
handled.
Embed an ICC (International Color Consortium) color management profile in
JPEG images generated by subsequent compression and lossless transformation
operations.
Losslessly transform a JPEG image into another JPEG image. Lossless
transforms work by moving the raw DCT coefficients from one JPEG image
structure to another without altering the values of the coefficients. While
this is typically faster than decompressing the image, transforming it, and
re-compressing it, lossless transforms are not free. Each lossless
transform requires reading and performing entropy decoding on all of the
coefficients in the source image, regardless of the size of the destination
image. Thus, this function provides a means of generating multiple
transformed images from the same source or applying multiple transformations
simultaneously, in order to eliminate the need to read the source
coefficients multiple times.
The maximum size of the buffer (in bytes) required to hold a JPEG image
transformed with the given transform parameters and/or cropping region.
This function is a wrapper for #tj3JPEGBufSize() that takes into account
cropping, transposition of the width and height (which affects the
destination image dimensions and level of chrominance subsampling),
grayscale conversion, and the ICC profile (if any) that was previously
associated with the TurboJPEG instance (see #tj3SetICCProfile()) or
extracted from the source image (see #tj3GetICCProfile() and
#TJPARAM_SAVEMARKERS.) The JPEG header must be read (see
tj3DecompressHeader()) prior to calling this function.