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

Reading multipage tiff Metadata #223

Closed
FelixA opened this issue Jan 11, 2017 · 1 comment
Closed

Reading multipage tiff Metadata #223

FelixA opened this issue Jan 11, 2017 · 1 comment

Comments

@FelixA
Copy link

FelixA commented Jan 11, 2017

Hi,

is there a way to read the metadata for every page of a multipage tiff document?

Using

Metadata metadata = TiffMetadataReader.readMetadata(tifFile);

for (Directory directory : metadata.getDirectories())
{
    for (Tag tag : directory.getTags())
    {
        System.out.println(tag);
    }
}

For a FIVE pages tiff, it only gives me the following Output:

[Exif IFD0] Image Width - 3526 pixels
[Exif IFD0] Image Height - 2575 pixels
[Exif IFD0] Bits Per Sample - 8 8 8 bits/component/pixel
[Exif IFD0] Compression - JPEG
[Exif IFD0] Photometric Interpretation - YCbCr
[Exif IFD0] Strip Offsets - 8
[Exif IFD0] Orientation - Top, left side (Horizontal / normal)
[Exif IFD0] Samples Per Pixel - 3 samples/pixel
[Exif IFD0] Rows Per Strip - 2575 rows/strip
[Exif IFD0] Strip Byte Counts - 981399 bytes
[Exif IFD0] X Resolution - 300 dots per inch
[Exif IFD0] Y Resolution - 300 dots per inch
[Exif IFD0] Resolution Unit - Inch
[Exif IFD0] Software - Pixel Translations Inc., PIXTIFF Version 58.5.1.1484

[Exif Thumbnail] Image Width - 4998 pixels
[Exif Thumbnail] Image Height - 3569 pixels
[Exif Thumbnail] Bits Per Sample - 8 8 8 bits/component/pixel
[Exif Thumbnail] Compression - JPEG
[Exif Thumbnail] Photometric Interpretation - YCbCr
[Exif Thumbnail] Strip Offsets - 6149377
[Exif Thumbnail] Orientation - Top, left side (Horizontal / normal)
[Exif Thumbnail] Samples Per Pixel - 3 samples/pixel
[Exif Thumbnail] Rows Per Strip - 3569 rows/strip
[Exif Thumbnail] Strip Byte Counts - 2189417 bytes
[Exif Thumbnail] X Resolution - 300 dots per inch
[Exif Thumbnail] Y Resolution - 300 dots per inch
[Exif Thumbnail] Resolution Unit - Inch
[Exif Thumbnail] Software - Pixel Translations Inc., PIXTIFF Version 58.5.1.1484

In which the Exif IFD0 Directory is page 1 and the Exif Thumbnail Directory is page 5.

I really like your library for single-page documents, so any help would be highly appreciated.

Best regards
Felix

@drewnoakes
Copy link
Owner

@kwhopper added support for this. Could you test it out using the latest code from master?

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