You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 5 tags available in the Baseline TIFF spec which are useful to put additional ASCII information into created files using writeArrayBuffer but the metadata doesn't exist or isn't able to be inserted because the tagTypes fail a lookup test and throw error eg Error: unknown type of tag: (270,271,272,315 or 33432) when they're added as metadata. There must be a lookup happening as when the tags are specified with their name, the error returned is with the correct associated Tag Code for that type name.
ASCII type tags not currently supported for writing:
Artist: 'Person who created the image.', // 315 (hex 0x013B)
ImageDescription: 'A string that describes the subject of the image.', // 270 (hex 0x010E)
Copyright: 'Copyright from original source image' // 33432 (hex 0x8298)
Make: 'The scanner manufacturer.', // Code 271 (hex 0x010F)
Model: 'The model name or number of the scanner, video digitizer, or other type of equipment used to generate the image.', // 272 (hex 0x0110)
The above are all ASCII type tags and listed with the Tag code as a comment at the end. Adding support to the writer for this metadata would be a useful addition to the library.
The text was updated successfully, but these errors were encountered:
timhj
changed the title
Support the Baseline TIFF metadata tags (all ASCII) when writing
Support the Baseline TIFF 'metadata' tags (all ASCII) when writing
Jun 19, 2024
Great idea! Would you be interested in submitting a PR? Indeed you are correct that a lookup is happening in geotiffwriter that is referencing globals.js. I think adding this info to globals.js would fix the problem, but adding a test is always a good idea, too!
timhj
added a commit
to timhj/geotiff.js
that referenced
this issue
Jun 20, 2024
@DanielJDufour - Done, PR requested. Unit test not written but have built and tested the changes and all worked as expected (Error: unknown type of tag: errors are gone, Metadata is written to appropriate fields and visible in Image viewers.
There are 5 tags available in the Baseline TIFF spec which are useful to put additional ASCII information into created files using writeArrayBuffer but the metadata doesn't exist or isn't able to be inserted because the tagTypes fail a lookup test and throw error eg
Error: unknown type of tag:
(270,271,272,315 or 33432
) when they're added as metadata. There must be a lookup happening as when the tags are specified with their name, the error returned is with the correct associated Tag Code for that type name.ASCII type tags not currently supported for writing:
The above are all ASCII type tags and listed with the Tag code as a comment at the end. Adding support to the writer for this metadata would be a useful addition to the library.
Full list of baseline tags is here: https://www.awaresystems.be/imaging/tiff/tifftags/baseline.html
The text was updated successfully, but these errors were encountered: