Skip to content

gdaladdo -r cubic / -r lanczos produce out-of-range pixel values on Byte rasters #14728

@zdila

Description

@zdila

What is the bug?

gdaladdo -r cubic and -r lanczos produce visibly anomalous pixels in lower overview levels of a Byte RGBA hillshade GeoTIFF - sparse pixels that are noticeably darker or brighter than any of their neighbours. The pixels are clearly not real terrain features. -r cubicspline and -r average on the same file are clean.

Same world location, same zoom level (1/16 overview), three resamplers:

Image

Note the stray dark/yellow pixels mid-frame in cubic and lanczos, absent in cubicspline.

Detail of lanczos result:

Image

Sample files (20 km × 20 km crop of a hillshade GeoTIFF, 4-band RGBA Byte, lossless DEFLATE):

Steps to reproduce the issue

To reproduce from scratch:

gdaladdo \
  --config COMPRESS_OVERVIEW DEFLATE \
  --config PREDICTOR_OVERVIEW 2 \
  -r cubic \
  report_crop20_no_overviews.tif

Then open the result in QGIS and zoom to the 1/16 overview level. Stray dark/bright pixels appear scattered across the image, not at edges.

Repeat with -r cubicspline on a fresh copy - artifacts gone.

Versions and provenance

  • OS: Debian GNU/Linux forky/sid (testing/unstable)
  • GDAL: GDAL 3.12.4 "Chicoutimi", released 2026/04/22
  • Source: conda-forge (gdal-3.12.4-np2py314h5ae587a_2)
  • Viewer: QGIS

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    not for AI loversSee https://gdal.org/en/stable/community/ai_tool_policy.html

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions