Click here to Skip to main content
15,851,387 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi All,

I am working on an application that needs to determine whether an image file is a tiff or a camera raw file. I already have code working to determine that an image file appears to be a valid image.

The problem I am having is determining whether a file is a Raw file, e.g. a CR2 or a tiff file, ".Tif". The main reason I am having this problem is that the underlying file structures actually appear pretty much the same - i.e. 99% of camera raw files use the tif file structure underneath the hood. I cannot just read the header and see a definitive difference. I also cannot use the extension of the file because Cannon are idiots and decided for the EOS 1D they would give their raw files a ".tif" file extension.

Has anyone been able to determine the difference between these two file types? If not can anyone point me in the right direction in terms of markers within the file itself that I can try to read. Below is the list of Raw files I need to work with:


There must be a way. Any help with this would be greatly appreciated



1 solution

Did u checkd the file special attributes like author and source?
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900