selective-php / image-type

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

Enhance TIFF format detection #5

Closed peter279k closed 5 years ago

peter279k commented 5 years ago

Changed log

The enhanced approach is as follows:

odan commented 5 years ago

TIFF is already supported :-)

peter279k commented 5 years ago

I know that and I enhance original approach.

odan commented 5 years ago

Before we add more complexity we should ask what kind of problem does it solve? Do you think the current solution does't detects the TIFF correctly? Is there a bug? Does it really matter for the image detection weather its has little endian or not? I think not.

peter279k commented 5 years ago

@odan, ok. That's right.

Reading the next 2 bytes seems that detecting the TIFF image in advanced, and it's optional work.