View Issue Details

IDProjectCategoryView StatusLast Update
0000607fileGeneralpublic2025-01-08 14:43
Reporterfractale Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version5.41 
Summary0000607: no resolution information about a tiff
Descriptionuse file on this tiff, you would not see resolution information like usual

https://drive.google.com/file/d/1U-9rRU6GhwctXeDZJGh_UPqkB8xAF88C/view?usp=sharing
TagsNo tags attached.

Activities

jsummers

2025-01-07 20:44

reporter   ~0004150

It's because, by default, 'file' only looks at the first 7MB of the input file. The data it would need from your TIFF file is beyond that limit.

The limit is configurable:

$ file -P bytes=20000000 testVertical.tiff
testVertical.tiff: TIFF image data, big-endian, direntries=18, height=1920, bps=253, compression=none, PhotometricInterpretation=RGB, orientation=upper-left, width=1080

fractale

2025-01-07 23:35

reporter   ~0004151

Hi jsummers, thanks for looking at this issue


I’m not sure how File works for tiff file but I assume it’s able to just find where is the resolution in a table at the beginning of the file and do not read the whole file until the limit, but I might be wrong. Is there any reason to have a limit when it comes to tiff? I feel EXIF data should be able to be located at the end of the file and File should be able to be smart enough to find it and just read that part of it and find a reference to it at the beginning of the file.

Best Regards,

Stephane Archer

jsummers

2025-01-08 14:43

reporter   ~0004152

I won't try to guess why 'file' makes the trade-offs it does.

TIFF is a free-form multi-image format. The information about the first image could be placed anywhere in the file. It's common for it to be right after the first image's image data. So, unfortunately, if the first image is very large, 'file' might not be able to tell you anything about it.

Issue History

Date Modified Username Field Change
2025-01-07 16:15 fractale New Issue
2025-01-07 20:44 jsummers Note Added: 0004150
2025-01-07 23:35 fractale Note Added: 0004151
2025-01-08 14:43 jsummers Note Added: 0004152