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

TIFF - comments lost after image resize #174

Closed
luku opened this issue Jan 10, 2019 · 3 comments
Closed

TIFF - comments lost after image resize #174

luku opened this issue Jan 10, 2019 · 3 comments

Comments

@luku
Copy link

luku commented Jan 10, 2019

Hi, I noticed that after resizing TIFF via imagemagick I can no longer extract some metadata.

sample.tif is the original file. It contains some metadata and your library extracted comments/imagedescription, comments/software and comments_html/imagedescription, comments_html/software.

sample-resized.tif is the resized file. It was created with imagemagick (ImageMagick 6.8.9-9 Q16 x86_64) cmd: convert sample.tif -resize 1900x1900> sample-resized.tif
It's not possible to extract the same metadata, but I can see in Adobe Bridge that the metadata are still there. Any idea what is the problem or difference between those 2 files or why it's not extracting the comments any more?

@JamesHeinrich
Copy link
Owner

Both files contain some <x:xmpmeta> XML metadata, presumably from Adobe Bridge. This data is not currently parsed by getID3.
The original file also contains a TIFF comment, but the resized file does not. I'm not sure if there is an ImageMagick option to copy/preserve TIFF comments.

I'll take a look when I have a moment to see how easy it would be to extract the Adobe metadata.

@luku
Copy link
Author

luku commented Jan 10, 2019

Thanks for quick reply! I couldn't find any argument for preserving comments, but I found one post about similar issue, when converting tiff to jpg. I can also confirm, there're warnings from IM: Incompatible type for "RichTIFFIPTC"; tag ignored. 'TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/881.
So it's probably that those tags are not recognized by IM and stripped, nothing strange in getID3.

But it would be great feature, if it's possible to implement Adobe metadata extraction!

JamesHeinrich added a commit that referenced this issue Feb 8, 2019
@JamesHeinrich
Copy link
Owner

I have improved TIFF parsing in 1e6b2ef

The XMP data, if available, is returned in [TIFF][XMP] but not parsed further; I leave that to the user if it's useful to them.

I also made a number of other small bugfixes in the TIFF module while I was there (unknown compression types, unhandled tag types, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants