cjpeg: Don't enable lossless until precision known

jpeg_enable_lossless() checks the point transform value against the data
precision, so we need to defer calling jpeg_enable_lossless() until
after all command-line options have been parsed.
This commit is contained in:
DRC
2024-06-19 17:27:01 -04:00
parent a8aaaf5d5b
commit bb3ab53157
2 changed files with 13 additions and 2 deletions

View File

@@ -19,6 +19,11 @@ prefetching caused a segfault if the `fill_input_buffer()` method in the
calling application's custom source manager incorrectly returned `FALSE` in
response to a prematurely-terminated JPEG data stream.
3. Fixed an issue in cjpeg whereby, when generating a 12-bit-per-sample or
16-bit-per-sample lossless JPEG image, specifying a point transform value
greater than 7 resulted in an error ("Invalid progressive/lossless parameters")
unless the `-precision` option was specified before the `-lossless` option.
3.0.3
=====