selective-php / image-type

Image type (format) detection for PHP
MIT License
7 stars 4 forks source link

Detect CR3 RAW images #8

Closed odan closed 5 years ago

odan commented 5 years ago

A camera raw image file contains minimally processed data from the image sensor of either a digital camera, a motion picture film scanner, or other image scanner.

Specification:

peter279k commented 5 years ago

After looking at the contents of Canon CR3 raw image format, it seems that the magic bytes are ftypcrx.

We can use these image bytes to identify this raw image format.

peter279k commented 5 years ago

@odan, I've noticed that it has other raw image formats.

They're mentioned in this wiki introduction.

Do we need to implement these image formats detection?

Or we can consider picking up them, not implement all of image formats detection?

odan commented 5 years ago

Good question.

There are dozens, if not hundreds, of raw formats in use by different models of digital equipment (like cameras or film scanners)

TIFF based RAW formats:

Oh yeah, there are really quite a lot RAW formats :-)

The ISO standard raw image format is ISO 12234-2, better known as TIFF/EP.

The most of them are based on the TIFF file format. These files may deviate from the TIFF standard in a number of ways, including the use of a non-standard file header, the inclusion of additional image tags and the encryption of some of the tagged data.

Then we have container based RAW formats:

And there is new Digital Negative (DNG) format pending:

I think we should focus on the most used RAW formats firsts.

For example the older RAW format like CR2 (TIFF based):

peter279k commented 5 years ago

@odan, thank you for your reply. Ok. We can focus on old RAW image formats firstly,

Could you have the individual issue about raw image format detection?

So that we can track the progress of RAW image formats detection one by one :).

odan commented 5 years ago

I just created new issues for the other RAW formats.