Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#1396 closed enhancement (fixed)

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)

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 (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 13 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 13 years ago by gok@…

Attachment: mrAk.TIF added

missing tif tags sample

comment:2 Changed 13 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 );




comment:3 Changed 12 years ago by Even Rouault

Keywords: tiff added
Milestone: 1.5.0
Resolution: fixed
Status: assignedclosed

Changes suggested tested and commited in trunk in r12100.

comment:4 Changed 12 years ago by warmerdam

Description: modified (diff)

Thanks Even.

Note: See TracTickets for help on using tickets.