Opened 10 years ago

Closed 10 years ago

#4096 closed defect (fixed)

Writing tiled YCBCR JPEG Compressed TIFFs produces anomolies on right and bottom

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: GTiff
Cc:

Description

Given a command like:

gdal_translate -of GTiff -ot Byte -co "TILED=YES" 
    -co "PROFILE=GeoTIFF" -co "COMPRESS=JPEG" 
    -co "JPEG_QUALITY=85" -co "PHOTOMETRIC=YCBCR" HS_1.tif out.tif

The resulting GeoTIFF file will have odd darkening on the right and bottom column and row of pixels. This appears to be some sort of effect from the undefined pixel values used to fill out the 256x256 tile - likely all zeros.

Attachments (2)

HS_1.tif (49.6 KB) - added by warmerdam 10 years ago.
Input file (raw data)
HS_1_output_YCBCR.tif (4.4 KB) - added by warmerdam 10 years ago.
example of odd output.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by warmerdam

Attachment: HS_1.tif added

Input file (raw data)

Changed 10 years ago by warmerdam

Attachment: HS_1_output_YCBCR.tif added

example of odd output.

comment:1 Changed 10 years ago by warmerdam

Milestone: 1.9.0
Status: newassigned

I have implemented preliminary logic to fill out partial edge tiles with the closest imagery from the valid area. This seems to resolve the problems I was seeing. For now in trunk only (r22435).

comment:2 Changed 10 years ago by Even Rouault

The following tests will need to be adjusted :

Script: gcore/tiff_ovr.py
  TEST: tiff_ovr_9 ... fail
    got wrong overview checksum.
  TEST: tiff_ovr_10 ... fail
    got wrong overview checksum.
  TEST: tiff_ovr_43 ... fail
    did not get expected checksum
  TEST: tiff_ovr_9: tiff_ovr_9_inverted ... fail
    got wrong overview checksum.
  TEST: tiff_ovr_10: tiff_ovr_10_inverted ... fail
    got wrong overview checksum.
  TEST: tiff_ovr_43: tiff_ovr_43_inverted ... fail
    did not get expected checksum
Script: gcore/tiff_write.py
  TEST: tiff_write_13 ... fail
    Did not get expected checksum on reopened file.
    Got 17347 instead of 17255.

comment:3 Changed 10 years ago by warmerdam

Milestone: 1.9.01.8.1
Resolution: fixed
Status: assignedclosed

Backported code change and test script updates back to 1.8 branch (r22439).

Note: See TracTickets for help on using tickets.