selective-php / image-type

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

Radiance (HDR) #36

Closed odan closed 5 years ago

odan commented 5 years ago

Radiance

Extenstions: .hdr, .pic

Identification

Files are supposed to begin with an ASCII signature of "#?RADIANCE". However, some apparently begin with "#?RGBE" instead, and some have no signature line at all. Note that some of Radiance's other file formats also use the "#?RADIANCE" signature.

peter279k commented 5 years ago

I can help this issue.

peter279k commented 5 years ago

About the identification:

Files are supposed to begin with an ASCII signature of "#?RADIANCE". However, some apparently begin with "#?RGBE" instead, and some have no signature line at all. Note that some of Radiance's other file formats also use the "#?RADIANCE" signature.

It seems that it will have three possible identifications:

@odan, it looks like the image format cannot be detected as Radiance (HDR) if it contains no signature.

odan commented 5 years ago

and some have no signature line at all

I think this fact can be ignored. In worst case the detector cannot indentify the Radiance image format. But for all other Radiance files, containing #?RADIANCE or #?RGBE, the detection should work quite well. I see no problem here.