Opened 13 years ago

Last modified 13 years ago

#3887 closed defect

trunk 1.8.0 regression with internal libtiff and JPEG compression — at Version 1

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 1.8.0
Component: default Version: unspecified
Severity: major Keywords:
Cc:

Description (last modified by Even Rouault)

gdal_translate ../autotest/gcore/data/rgbsmall.tif  tif_jpeg.tif -co COMPRESS=JPEG

produces a dataset that cannot be read :

$ gdalinfo -checksum tif_jpeg.tif
Driver: GTiff/GeoTIFF
Files: tif_jpeg.tif
Size is 50, 50
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-44.840319999999998,-22.932583999999999)
Pixel Size = (0.003432000000000,-0.003432000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -44.8403200, -22.9325840) ( 44d50'25.15"W, 22d55'57.30"S)
Lower Left  ( -44.8403200, -23.1041840) ( 44d50'25.15"W, 23d 6'15.06"S)
Upper Right ( -44.6687200, -22.9325840) ( 44d40' 7.39"W, 22d55'57.30"S)
Lower Right ( -44.6687200, -23.1041840) ( 44d40' 7.39"W, 23d 6'15.06"S)
Center      ( -44.7545200, -23.0183840) ( 44d45'16.27"W, 23d 1' 6.18"S)
Band 1 Block=50x50 Type=Byte, ColorInterp=Red
Warning 1: JPEGPreDecode:Improper JPEG sampling factors 2,2
Apparently should be 1,1.
ERROR 1: JPEGPreDecode:Cannot honour JPEG sampling factors that exceed those specified.
ERROR 1: TIFFReadEncodedStrip() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
ERROR 3: Checksum value couldn't be computed due to I/O read error.

  Checksum=0
Band 2 Block=50x50 Type=Byte, ColorInterp=Green
  Checksum=0
Band 3 Block=50x50 Type=Byte, ColorInterp=Blue
  Checksum=0

Works fine with 1.7 branch and its internal libtiff.

The issue occurs when writing the dataset (a dataset produced with 1.7 can be read by trunk, but not the reverse)

Change History (1)

comment:1 by Even Rouault, 13 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.