Further partial image decompression fixes

- Referring to 073b0e88a1 and #185, the
  reason why BMP and RLE didn't (and won't) work with partial image
  decompression is that the output engines for both formats maintain a
  whole-image buffer, which is used to reverse the order of scanlines.
  However, it was straightforward to add -crop support for GIF and
  Targa, which is useful for testing partial image decompression along
  with color quantization.
- Such testing reproduced a bug reported by Mozilla (refer to PR #182)
  whereby jpeg_skip_scanlines() would segfault if color quantization was
  enabled.  To fix this issue, read_and_discard_scanlines() now sets up
  a dummy quantize function in the same manner that it sets up a dummy
  color conversion function.

Closes #182
This commit is contained in:
DRC
2017-11-13 21:01:53 -06:00
parent f3ad13e3d8
commit 5bc43c7821
11 changed files with 110 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
.TH DJPEG 1 "8 November 2017"
.TH DJPEG 1 "13 November 2017"
.SH NAME
djpeg \- decompress a JPEG file to an image file
.SH SYNOPSIS
@@ -205,7 +205,7 @@ with width W and height H. If necessary, X will be shifted left to the nearest
iMCU boundary, and the width will be increased accordingly. Note that if
decompression scaling is being used, then X, Y, W, and H are relative to the
scaled image dimensions. Currently this option only works with the
PBMPLUS (PPM/PGM) output format.
PBMPLUS (PPM/PGM), GIF, and Targa output formats.
.TP
.B \-verbose
Enable debug printout. More