Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/image/tiff: decoding of metadata is not available #59079

Closed
vault-thirteen opened this issue Mar 16, 2023 · 5 comments
Closed

x/image/tiff: decoding of metadata is not available #59079

vault-thirteen opened this issue Mar 16, 2023 · 5 comments
Labels
FeatureRequest WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@vault-thirteen
Copy link

Current implementation of TIFF decoder is unable to decode following metadata from TIFF image:

  • TIFF tags
  • EXIF tags
  • GPS tags

What version of Go are you using (go version)?

$ go version
go version go1.20.2 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Microsoft Windows 10
Intel x86-64 (a.k.a. AMD64)

What did you expect to see?

Usable metadata for TIFF images.

@gopherbot gopherbot added this to the Unreleased milestone Mar 16, 2023
@cherrymui cherrymui changed the title x/image/tiff: Decoding of metadata is not available. x/image/tiff: decoding of metadata is not available Mar 17, 2023
@cherrymui
Copy link
Member

It looks like it needs a new API to decode the metadata? Would you like to file a proposal (see https://golang.org/s/proposal-process)? Thanks.

@cherrymui cherrymui added FeatureRequest WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Mar 17, 2023
@vault-thirteen
Copy link
Author

It looks like it needs a new API to decode the metadata?

Well, this question is as difficult as the TIFF format itself.
Let me try to answer.

First of all, the TIFF abbreviation means Tag Image File Format. So, the key feature of the format is its "tagged" nature. By the way, even the word "tag" itself has had different meanings in different versions of the TIFF specification. That is why I say about the difficulty. TIFF format can be studied as a history of the computer science of the humankind, because it stores a lot of historical changes in data encoding and thus is very complicated.

Changes in Terminology
In previous versions of the specification, the term “tag” reffered both to the identi-
fying number of a TIFF field and to the entire field. In this version, the term “tag”
refers only to the identifying number. The term “field” refers to the entire field,
including the value.

In the TIFF 6.0 Specification it is stated that tag is the identifier of a field. The field is a directory entry. In earlier versions of the format, tag was actually the whole directory entry.

So, to make it clear, I am talking about the so-called "tagged" nature of the TIFF format in terms of the original (old) TIFF format. But the idea stays the same. Each "piece" of information in the TIFF format is a tagged data. Raster image data is tagged, and various meta data is also tagged.

The main feature of TIFF format is the ability to store huge amounts of information of different kinds inside tags.

For me as a programmer there is no difference between raster graphics and various meta data, as they all are just byte arrays sitting inside the 'value' field of a tag (directory entry).

I am sorry for such a big introduction, but I think that it was very important.

It looks like it needs a new API to decode the metadata?

My suggestion is to implement a generic tag parser and to treat all tags equally. This means that tags of raster image data and tags of other data should be treated equally.

This means that not only raster image data should be accessible by the user, but also all other tags should be accessible by the user.

In the existing "x/image/tiff" library meta-data tags are mostly ignored.

Would you like to file a proposal (see https://golang.org/s/proposal-process)? Thanks.

Well, I do not have enough time for creating documents about the already existing documents. I mean, the TIFF 6.0 Specification already exists. All I want is to treat all the TIFF tags equally and make them accessible by the user.

TIFF 6.0 Specification (Revision 6.0 Final — June 3, 1992)
https://developer.adobe.com/content/dam/udp/en/open/standards/tiff/TIFF6.pdf

A couple of days ago I have written a simple library to parse tags of the TIFF format. The library supports official tags and some other tags, including the unofficial so-called “Sub-IFD” feature. I can tell where it is located, if you are interested. I want to use something similar to this as a built-in feature of the Go programming language.

Thank you.

@vault-thirteen
Copy link
Author

Is the provided information enough ?

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jul 9, 2023
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2023
@vault-thirteen
Copy link
Author

If someone needs TIFF metadata decoded, this functionality is available in the "TIFFer" library – https://github.com/vault-thirteen/TIFFer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants