View Issue Details

IDProjectCategoryView StatusLast Update
0000441fileGeneralpublic2023-05-21 15:51
Reporterfabianthdev Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.44 
Fixed in Version5.45 
Summary0000441: Radiance File MIME-Types Commented Out
DescriptionWhen checking the file type of an `.hdr` Radiance file, the correct format is reported by `file`:
```
$ file radiance_file.hdr
radiance_file.hdr: Radiance HDR image data
```

However, when querying for the MIME type, the correct value of `image/vnd.radiance` is not returned, instead the following MIME type is determined:
```
$ file --mime radiance_file.hdr
radiance_file.hdr: application/octet-stream; charset=binary
```

Looking at `magic/Magdir/images`, it appears that the correct MIME type is defined for radiance files, however it seems to be commented out and is thus not returned.

I would suggest the following patch to return the correct MIME type for Radiance files:
```
diff --git a/magic/Magdir/images b/magic/Magdir/images
index 19e362ae..be10993a 100644
--- a/magic/Magdir/images
+++ b/magic/Magdir/images
@@ -2549,7 +2549,7 @@
 # URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/
 # Radiance HDR; usually has .pic or .hdr extension.
 0 string #?RADIANCE\n Radiance HDR image data
-#!mime image/vnd.radiance
+!:mime image/vnd.radiance
 
 # From: Adam Buchbinder <adam.buchbinder@gmail.com>
 # URL: https://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf
```

If the MIME type definition has been commented out deliberately, please explain why.
Steps To ReproduceCheck the file type of a Radiance HDR file with the `file` command:
```
$ file --mime radiance_file.hdr
```

Result: `radiance_file.hdr: application/octet-stream; charset=binary`

Expected result: `radiance_file.hdr: image/vnd.radiance; charset=binary`
TagsNo tags attached.

Activities

christos

2023-05-21 15:51

manager   ~0003929

Fixed, thanks!

Issue History

Date Modified Username Field Change
2023-04-17 10:37 fabianthdev New Issue
2023-05-21 15:51 christos Assigned To => christos
2023-05-21 15:51 christos Status new => assigned
2023-05-21 15:51 christos Status assigned => resolved
2023-05-21 15:51 christos Resolution open => fixed
2023-05-21 15:51 christos Fixed in Version => 5.45
2023-05-21 15:51 christos Note Added: 0003929