Opened 10 years ago

Closed 10 years ago

#4732 closed defect (fixed)

[PATCH - libtiff] Support creating RGBA pixel-interleaved JPEG-compressed TIFF

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: libtiff


Internal libtiff can :

  • read correctly RGBA pixel-interleaved JPEG-compressed TIFF
  • read correctly RGBA band-interleaved JPEG-compressed TIFF
  • write correctly RGBA band-interleaved JPEG-compressed TIFF

But it can no write RGBA pixel-interleaved JPEG-compressed TIFF, because it sets sp->cinfo.c.in_color_space = JCS_RGB when td->td_photometric == PHOTOMETRIC_RGB without checking that the number of samples per pixel is 3 (if it is not 3, then libjpeg throws a 'JPEGLib: Bogus input colorspace' error.

Patch attached to fix that and use in_color_space = JCS_UNKNOWN instead in that case.

Attachments (1)

tif_jpeg_gdal_4732.patch (742 bytes ) - added by Even Rouault 10 years ago.
Patch to libtiff

Download all attachments as: .zip

Change History (3)

by Even Rouault, 10 years ago

Attachment: tif_jpeg_gdal_4732.patch added

Patch to libtiff

comment:1 by Even Rouault, 10 years ago

r24651 /trunk/ (2 files in 2 dirs): GTiff: fix writing of RGBA pixel-interleaved JPEG-compressed TIFF (#4732)

comment:2 by warmerdam, 10 years ago

Resolution: fixed
Status: newclosed

Patch applied upstream, and should appear in libtiff 4.0.3.

Note: See TracTickets for help on using tickets.