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, and it is thus possible
for a very high-quality JPEG image with very high-frequency content to
expand rather than compress when converted to the JPEG format. Such images
represent a very rare corner case, but since there is no way to predict the
size of a JPEG image prior to compression, the corner case has to be
handled.
@param width width of the image (in pixels)
@param height height of the image (in pixels)
@param jpegSubsamp the level of chrominance subsampling to be used when
generating the JPEG image (see @ref TJSAMP
"Chrominance subsampling options".)
@return the maximum size of the buffer (in bytes) required to hold the
image, or -1 if the arguments are out of bounds.
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, and it is thus possible for a very high-quality JPEG image with very high-frequency content to expand rather than compress when converted to the JPEG format. Such images represent a very rare corner case, but since there is no way to predict the size of a JPEG image prior to compression, the corner case has to be handled.
@param width width of the image (in pixels) @param height height of the image (in pixels) @param jpegSubsamp the level of chrominance subsampling to be used when generating the JPEG image (see @ref TJSAMP "Chrominance subsampling options".)
@return the maximum size of the buffer (in bytes) required to hold the image, or -1 if the arguments are out of bounds.