Opened 14 years ago

Closed 14 years ago

#3570 closed defect (fixed)

Overviews of a large IMG (10) have "red" spots

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 1.7.3
Component: GDAL_Raster Version: 1.6.1
Severity: normal Keywords:
Cc:

Description

Frank, The test dataset is on a DVD and in the mail to you.

Change History (5)

comment:1 by gaopeng, 14 years ago

More info: I tested it, and got gray overviews instead of "red" spotted.

comment:2 by warmerdam, 14 years ago

Status: newassigned

Gao,

I have made several runs with gdaladdo and examined the results at various resolutions levels in a GDAL based viewer,and I am not seeing any color issues. My last run was with:

gdaladdo --config COMPRESS_OVERVIEW JPEG --config COMPRESS_OVERVIEW JPEG \
         --config JPEG_QUALITY_OVERVIEW 75 --config SIMPLE_JPEG_MAGIC YES \
         --config BIGTIFF_OVERVIEW IF_SAFER --config USE_RRD YES \
         -ro WorldIMG.img 2 4 8 16 32 64

on linux against the 1.6-esri branch. Can you provide details on how you are building the overviews? Perhaps the overview files could be made available for examination?

comment:3 by gaopeng, 14 years ago

Frank,

I uploaded the rrd, WorldIMG.rrd, to ftp://ftp.esri.com.

Sorry I wasn't clear. In this case, the overviews are generated in a .rrd file, not using JPEG compression.

comment:4 by warmerdam, 14 years ago

Gao,

WorldIMG.img has no names for the layers. This causes the overviews to be created with empty layer names, and so all the overviews have the same name regardless of what band they relate to. This causes the overviews to appear greyscale (the first gets used for all bands).

I think this is due to a transitory bug in GDAL that was fixed a couple of months ago, but any files produced this way will have additional issues going forward. I'm going to look into "faking" layer names for files with empty names to avoid problems going forward, but hopefully there are none, or few of these in the wild.

comment:5 by warmerdam, 14 years ago

Milestone: 1.7.3
Resolution: fixed
Status: assignedclosed

I have incorporated a change so that band names are synthesized if the one actually in the .img file is zero length - like for this one. This synthesized name is then used for naming the overviews and avoid duplication. The change is in trunk (r19686), 1.6-esri (r19687) and 1.6 (r19688).

This fixes the problem I saw. To be clear the only problem I did see what greyscale overviews. I did not see this problem with red areas, though it is possible something like this might happen in arcgis if there were different stretches being applied to red, green and blue.

Please reopen if this does not solve the issue at your end.

Note: See TracTickets for help on using tickets.