Ticket #1396 (closed enhancement: fixed)

Opened 7 years ago

Last modified 6 years ago

missing tiff tags to read/write metadata

Reported by: gok@… Owned by: warmerdam
Priority: highest Milestone: 1.5.0
Component: GDAL_Raster Version: 1.3.2
Severity: minor Keywords: tiff
Cc: gok@…

Description (last modified by warmerdam) (diff)

Following tif tags are missing in WriteMDMetadata(), GTiffDataset::OpenOffset() routines in geotiff.cpp:

TIFFTAG_ARTIST
TIFFTAG_HOSTCOMPUTER
TIFFTAG_COPYRIGHT

Adding it to the code does fix geoTiff read/write processes.

Attachments

mrAk.TIF Download (57.5 KB) - added by gok@… 7 years ago.
missing tif tags sample

Change History

Changed 7 years ago by warmerdam

Can you provide a test file with these three fields, and perhaps the
specific code changes if you have already implement and tested them?

Changed 7 years ago by gok@…

missing tif tags sample

Changed 7 years ago by gok@…

Attached is a sample with 3 missing tags.
Needs just to add following:
File geotiff.cpp.
WriteMDMetadata (somewhere around line 2404):

                else if( EQUAL(pszItemName,"TIFFTAG_ARTIST") )
                    TIFFSetField( hTIFF, TIFFTAG_ARTIST, pszItemValue );
                else if( EQUAL(pszItemName,"TIFFTAG_HOSTCOMPUTER") )
                    TIFFSetField( hTIFF, TIFFTAG_HOSTCOMPUTER, pszItemValue );
                else if( EQUAL(pszItemName,"TIFFTAG_COPYRIGHT") )
                    TIFFSetField( hTIFF, TIFFTAG_COPYRIGHT, pszItemValue );

GTiffDataset::OpenOffset (after inserting first it will be around line 3140):

        if( TIFFGetField( hTIFF, TIFFTAG_ARTIST, &pszText ) )
            SetMetadataItem( "TIFFTAG_ARTIST", pszText );
        if( TIFFGetField( hTIFF, TIFFTAG_HOSTCOMPUTER, &pszText ) )
            SetMetadataItem( "TIFFTAG_HOSTCOMPUTER", pszText );
        if( TIFFGetField( hTIFF, TIFFTAG_COPYRIGHT, &pszText ) )
            SetMetadataItem( "TIFFTAG_COPYRIGHT", pszText );




Changed 6 years ago by rouault

  • keywords tiff added
  • status changed from assigned to closed
  • resolution set to fixed
  • milestone set to 1.5.0

Changes suggested tested and commited in trunk in r12100.

Changed 6 years ago by warmerdam

  • description modified (diff)

Thanks Even.

Note: See TracTickets for help on using tickets.