Exiv2/exiv2

Exiv2 brakes GeoTIFF COG (cloud optimised) format

Opened this issue · 0 comments

Describe the bug

exiv2 (via CLI or API) brake something in the GeoTIFF cloud optimised format (COG) that do not allow to be read it via QGIS.

To Reproduce

Steps to reproduce the behavior:

  1. get a generic GeoTIFF
  2. verify that can be opened in QGIS
    2.1) verify that is a valid COG with rio cogeo validate destination.tif
  3. convert in COG "format" generated with:
    gdal_translate source.tif destination.tif -of GTiff -co COMPRESS=DEFLATE -co TILED=YES
    or with:
    rio cogeo create source.tif destination.tif
  4. verify that destination.tif can be opened in QGIS
  5. add or modify a Exif tag e.g.
    exiv2 -M "set Exif.Photo.CameraOwnerName Ascii aaaaaaaaaaa" destination.tif
  6. verify that QGIS cannot open the image
    5.1) verify that it is no more a valid rio cogeo validate destination.tif

Expected behavior

  1. destination.tif can be opened correctly in QGIS
  2. verify that is a valid COG with rio cogeo validate destination.tif

Desktop (please complete the following information):

  • Ubuntu 24.04.1 LTS
  • 0.27.6 (installed via apt)