[Radiance-dev] Radiane MIME types

R Fritz rfritz at u.washington.edu
Thu Nov 6 15:06:57 PST 2008


I've now reviewed RFC 4288, *Media Type Specifications and  
Registration Procedures* (current best practices) with an eye to  
registering Radiance .pic/.hdr files as an internet type. I've avoided  
looking at other file types, at least for the moment. Here's some of  
my notes on this:

1. Since 2005, only a standards body can register an unqualified type;  
image/hdr, say. So we'd probably best come in as a "vendor" (broadly  
construed) type; image/vnd.radiance, perhaps. (I can make a case for  
vnd.radiance.hdr, but it seems like overkill).

2. We're encouraged (but not required) to submit information about the  
format of our files. I think it would be a good idea to submit the  
Radiance picture file format, possibly lightly edited and expanded.  
I'll sign up for the ietf-types at iana.org mailing list and see what we  
might submit.

3. We need to conduct a security analysis, though I don't think we  
have major issues here. The main one is that .pic format does use  
compression, which might be used in a resource-denial attack.

...to be continued...

Randolph

On Oct 25, 2008, at 2:51 PM, R Fritz wrote:

> It looks pretty straightforward; I'll have to review the submission  
> requirements in more detail, but I don't see serious problems. We'll  
> probably have to come in as an organization-specific type ("image/ 
> vnd.radiance"), since an unqualified type now has to come from a  
> recognized standards body. I'll get back with more details later  
> this week.
>
> Randolph
>
> On Oct 25, 2008, at 11:33 AM, Axel Jacobs wrote:
>
>> Randolph,
>>
>> The official mime types are assined by the IANA:
>> http://www.iana.org/assignments/media-types/
>>
>> Getting .hdr accepted by IANA would mean that eventually all other
>> mime assignment, e.g.
>> for the various LINUX desktops:
>> http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
>> will pick it up
>>
>> I started a thread here:
>> http://luminance.londonmet.ac.uk/radiance_mailinglists/dev/2006-November/000761.html
>> but it didn't lead anywhere.
>>
>> When I said I was not sufficiently confident about the file format,
>> then this is what I meant:
>> (see http://radsite.lbl.gov/radiance/refer/filefmts.pdf)
>>
>> HDR comes in two flavours:
>> - RGBE
>> - XYZE
>>
>> Each of those two flavours has three sub-flavours:
>> - non-rle
>> - rle
>> - mixed
>>
>> Greg (http://luminance.londonmet.ac.uk/radiance_mailinglists/dev/2006-November/000766.html 
>> ):
>> -----------8<--------------
>>> Both, RGBE and XYZE come in flat and in RLE flavours. However, the
>>> official file specs only mention two FORMAT= string, i.e. 32-
>>> bit_rle_rgbe
>>> and 32-bit_rle_xyze. How does this work?
>>
>> I decided not to sub-type based on the presence or absence of run-
>> length encoding.  Since the reader routines identify RLE on a per
>> scanline basis (and in fact there can be a mix of RLE and
>> uncompressed scanlines), there seemed no need for a separate format
>> specifier.
>>
>>> The MIME specs have the notion of subclasses. So would RGBE and
>>> XYZE be
>>> subclasses of RADIANCE HDR?
>>
>> Again, I wouldn't bother to distinguish these within MIME.  It would
>> be like distinguishing between different classes of TIFF.  Any
>> software that opens an RGBE file will also open an XYZE file, even if
>> it won't display the colors correctly.
>> -----------8<--------------
>>
>> So there you go...
>>
>> I've started working on a mime XML file following the freedesktop.org
>> style. This is to make my yearly chore of rolling LEARNIX somewhat
>> easier. It's not well tested yet, but here is the first draft. The  
>> bit
>> with the extensions seems to work, but I haven't tried yet what
>> happens when the extension is removed (mime magick).
>>
>> Ignore all non-HDR stuff. I just thought I might as well leave it in,
>> in the hope of getting some comments.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info 
>> ">
>>
>>  <mime-type type="image/x-hdr">
>>    <comment xml:lang="en">HDR image</comment>
>> 	<alias type="image/x-radiance"/>
>> 	<alias type="image/x-rgbe"/>
>>    <magic priority="50">
>>      <match type="string" value="#?RADIANCE" offset="0"/>
>>      <match type="string" value="FORMAT=32-bit_rle_rgbe"  
>> offset="0:500"/>
>>    </magic>
>>    <glob pattern="*.hdr"/>
>>    <glob pattern="*.unf"/>
>>    <glob pattern="*.xyze"/>
>>    <glob pattern="*.rgbe"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-control">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance input</comment>
>>    <glob pattern="*.rif"/>
>>  </mime-type>
>>
>>  <mime-type type="application/x-radiance-octree">
>>    <comment xml:lang="en">Radiance octree</comment>
>>    <magic priority="50">
>>      <match type="string" value="#?RADIANCE" offset="0"/>
>>      <match type="string" value="FORMAT=Radiance_octree"  
>> offset="0:500"/>
>>    </magic>
>>    <glob pattern="*.oct"/>
>>  </mime-type>
>>
>>  <mime-type type="application/x-radiance-ambient-cache">
>>    <comment xml:lang="en">Radiance ambient cache</comment>
>>    <glob pattern="*.amb"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-holodeck-control">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance holodeck input</comment>
>>    <glob pattern="*.hif"/>
>>  </mime-type>
>>
>>  <mime-type type="application/x-radiance-holodeck">
>>    <comment xml:lang="en">Radiance holodeck</comment>
>>    <glob pattern="*.hdk"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-geometry">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance geometry</comment>
>>    <glob pattern="*.rad"/>
>>    <glob pattern="*.norm"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-triangle-mesh">
>>    <comment xml:lang="en">Radiance triangle mesh</comment>
>>    <glob pattern="*.rtm"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-material">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance material</comment>
>>    <glob pattern="*.mat"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-view">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance view</comment>
>>    <glob pattern="*.vf"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-cal">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance cal</comment>
>>    <glob pattern="*.cal"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-bgraph">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance bgraph</comment>
>>    <glob pattern="*.bgraph"/>
>>  </mime-type>
>>
>>  <mime-type type="model/x-radiance-options">
>> 	<sub-class-of type="text/plain"/>
>>    <comment xml:lang="en">Radiance options</comment>
>>    <glob pattern="*.opt"/>
>>  </mime-type>
>>
>> </mime-info>
>>
>> Axel
>>
>> _______________________________________________
>> Radiance-dev mailing list
>> Radiance-dev at radiance-online.org
>> http://www.radiance-online.org/mailman/listinfo/radiance-dev
>




More information about the Radiance-dev mailing list