View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000607 | file | General | public | 2025-01-07 16:15 | 2025-01-08 14:43 |
Reporter | fractale | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.41 | ||||
Summary | 0000607: no resolution information about a tiff | ||||
Description | use file on this tiff, you would not see resolution information like usual https://drive.google.com/file/d/1U-9rRU6GhwctXeDZJGh_UPqkB8xAF88C/view?usp=sharing | ||||
Tags | No tags attached. | ||||
|
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 |
|
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 |
|
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. |