Changes between Initial Version and Version 2 of Ticket #1483


Ignore:
Timestamp:
Apr 1, 2007, 7:20:23 PM (17 years ago)
Author:
warmerdam
Comment:

Seth,

The message you are seeing is produced by libtiff.

I haven't dug into it in detail, but to the best of my understanding the TIFF specification requires every image directory to have the image width and height tags. If you are producing an EXIF directory in the "main directory chain" of the TIFF file you are required to adhere to the TIFF specification regardless of what the EXIF specification may say (IMHO).

So, I'm inclined to bounce this back to the exif tool author.

In any event, it isn't a GDAL issue. The closest it gets to GDAL is libtiff.

Tentatively closing this, but feel free to re-open it if there is reason to believe there is a GDAL issue.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1483

    • Property Priority highestnormal
    • Property Status newclosed
    • Property Component defaultGDAL_Raster
    • Property Resolutioninvalid
  • Ticket #1483 – Description

    initial v2  
     1
     2I have an error with some large (geo)tiffs that I'm working with. I've generated them with georeferenced info via the GDAL utilities, then I want to add an overview image (like a preview) using the gdaladdo utility. If I use exiftool to add a preview first, gdaladdo reports an error in the file format. See the commands below:
    13{{{
    2 I have an error with some large (geo)tiffs that I'm working with. I've generated them with georeferenced info via the GDAL utilities, then I want to add an overview image (like a preview) using the gdaladdo utility. If I use exiftool to add a preview first, gdaladdo reports an error in the file format. See the commands below:
    3 
    44"
    55Pine06:~ sage$ cp orig.tif exif_tooled.tif
     
    1313...10...20...30...40...50...60...70...80...90...100 - done.
    1414"
    15 
     15}}}
    1616At first I thought that it was a bug in exiftool, so I emailed the author. It looks like it's actually a bug with GDAL (or libtiff) expecting tags that aren't required for an EXIF image preview. Here is his full reply:
    1717
     
    2121In your case, however, ExifTool is adding IFD1, not the ExifIFD.  According to the specification, ImageWidth and ImageLength are only required in IFD1 for uncompressed images.  For compressed thumbnails (ie. JPEG), the only mandatory tags are:
    2222
    23 - Compression
    24 - XResolution
    25 - YResolution
    26 - ResolutionUnit
    27 - ThumbnailOffset (aka JPEGInterchangeFormat)
    28 - ThumbnailLength (aka JPEGInterchangeLength)
     23 * Compression
     24 * XResolution
     25 * YResolution
     26 * ResolutionUnit
     27 * ThumbnailOffset (aka JPEGInterchangeFormat)
     28 * ThumbnailLength (aka JPEGInterchangeLength)
    2929
    3030And these are exactly what is written.
     
    3737I followed his recommendation with setting the height and width, and GDAL threw a new error:
    3838
    39 "
     39{{{
    4040Pine06:~ sage$ ./exiftool -v5 '-ThumbnailImage<=thumb.jpg' -IFD1:ImageWidth=512 -IFD1:ImageHeight=512 exif_tooled.tif
    4141Pine06:~ sage$ ./gdaladdo -r average exif_tooled.tif 16 32
     
    43430ERROR 1: MissingRequired:exif_tooled.tif: TIFF directory is missing required "StripOffsets" field
    4444...10...20...30...40...50...60...70...80...90...100 - done.
    45 "
    4645}}}