I am using the java version 2.8.1 of metadata-extractor to read a CR2 file. According to the dump of tags there is a Exif Thumbnail directory and it claims there is a thumbnail offset and length. However, when I call getThumbnailData()
on the ExifThumbnailDirectory
object it returns null. Any idea why? The photo was taken with a Canon EOS 70D camera. Code works fine when I am calling it with JPEGs. The source photo file can be found here.
[Exif Thumbnail] - Thumbnail Offset(0x0201) = 80600 bytes
[Exif Thumbnail] - Thumbnail Length(0x0202) = 15272 bytes
[Exif Thumbnail] - Image Width(0x0100) = 5568 pixels
[Exif Thumbnail] - Image Height(0x0101) = 3708 pixels
[Exif Thumbnail] - Bits Per Sample(0x0102) = 16 16 16 bits/component/pixel
[Exif Thumbnail] - Thumbnail Compression(0x0103) = JPEG (old-style)
[Exif Thumbnail] - Photometric Interpretation(0x0106) = RGB
[Exif Thumbnail] - Strip Offsets(0x0111) = 4472188
[Exif Thumbnail] - Samples Per Pixel(0x0115) = 3 samples/pixel
[Exif Thumbnail] - Rows Per Strip(0x0116) = 309 rows/strip
[Exif Thumbnail] - Strip Byte Counts(0x0117) = 22883515 bytes
[Exif Thumbnail] - Planar Configuration(0x011c) = Chunky (contiguous for each subsampling pixel)
[Exif Thumbnail] - Unknown tag (0xc5d9) = 2
[Exif Thumbnail] - Unknown tag (0xc6c5) = 1
[Exif Thumbnail] - Unknown tag (0xc6dc) = 450 301 7 4
[Exif Thumbnail] - Unknown tag (0xc5d8) = 1
[Exif Thumbnail] - Unknown tag (0xc5e0) = 1
[Exif Thumbnail] - Unknown tag (0xc640) = 1 2784 2784
[File] - File Name(0x0001) = foo.CR2
[File] - File Size(0x0002) = 27361411 bytes