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

Enhancement: expose TIFFTAG_PHOTOSHOP metadata #1600

Closed
SanderVanLeeuwen opened this issue Mar 5, 2019 · 5 comments
Closed

Enhancement: expose TIFFTAG_PHOTOSHOP metadata #1600

SanderVanLeeuwen opened this issue Mar 5, 2019 · 5 comments

Comments

@SanderVanLeeuwen
Copy link

For some files (usually tiff's) the extracted metadata doesn't contain any EXIF information, while the file itself does. See for example the attached tif (zipped, because GitHub doesn't support tif uploads).

Is there something wrong with the file itself, am I doing something wrong, or is this a bug?

test.tif.zip

@lovell
Copy link
Owner

lovell commented Mar 5, 2019

Hello, I see the following metadata for this image:

{ format: 'tiff',
  width: 317,
  height: 211,
  space: 'rgb16',
  channels: 3,
  depth: 'ushort',
  density: 72,
  isProgressive: false,
  pages: 1,
  hasProfile: true,
  hasAlpha: false,
  orientation: 1,
  icc:
   <Buffer 00 00 02 30 41 44 42 45 02 10 00 00 6d 6e 74 72 52 47 42 20 58 59 5a 20 07 cf 00 06 00 03 00 00 00 00 00 00 61 63 73 70 41 50 50 4c 00 00 00 00 6e 6f ... >,
  xmp:
   <Buffer 3c 3f 78 70 61 63 6b 65 74 20 62 65 67 69 6e 3d 22 ef bb bf 22 20 69 64 3d 22 57 35 4d 30 4d 70 43 65 68 69 48 7a 72 65 53 7a 4e 54 63 7a 6b 63 39 64 ... > }

I don't think this image has any EXIF metadata. Could it be the TIFFTAG_PHOTOSHOP metadata that you're expecting? libvips exposes this but sharp does not currently.

Do you have a non-TIFF example that exhibits this behaviour?

@lovell lovell added the question label Mar 5, 2019
@SanderVanLeeuwen
Copy link
Author

Thanks for looking in to this. You might be right that all files I encountered this with are TIFF's, I cannot remember any questions about JPG's from within our community.

To be honest I don't know all ins and outs about metadata locations in image files. For this specific example I just checked the data in Photoshop (available) and used a tool like http://metapicz.com/#landing to check the data (available), but where those tools are looking specifically I don't know.

Is it possible to easily expose this data in sharp too?

When I find a non-TIFF example I'll let you know!

@lovell lovell changed the title EXIF data missing from metadata Enhancement: expose TIFFTAG_PHOTOSHOP metadata Mar 8, 2019
@lovell lovell added this to the v0.23.4 milestone Nov 29, 2019
@lovell
Copy link
Owner

lovell commented Dec 5, 2019

v0.23.4 now available, which exposes the raw TIFFTAG_PHOTOSHOP metadata in the tifftagPhotoshop property.

@lovell lovell closed this as completed Dec 5, 2019
@SanderVanLeeuwen
Copy link
Author

An early Christmas present! Thanks; will experiment with it in the coming days! :)

@lovell
Copy link
Owner

lovell commented Dec 5, 2019

No worries, you'll still need logic to parse the contents of the Buffer as this provides the raw data only. I'd be interested to learn if you are able to find/make something suitable to do this.

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

No branches or pull requests

2 participants