[CREATE] OpenRaster fallbacks (proposal/RFC)

Øyvind Kolås islewind at gmail.com
Sun Aug 2 05:36:35 PDT 2009


On Thu, Jul 30, 2009 at 7:40 AM, Jon A. Cruz<jon at joncruz.org> wrote:
> On Jul 28, 2009, at 7:43 AM, Cyrille Berger wrote:
> On Saturday 25 July 2009, Martin Renold wrote:
>> Does anyone think this is a bad idea? Anyone got a different idea?
> I don't think that having a tag decided the use of the next tag is a good
> XML
> design (but then I am not an expert at XML...), I am not even sure we can
> enforce that in a schema.
> Um... "eek!"
> When phrased that way, it seems like a very un-XML approach to things.
> It strikes me that the MIME fallback approach might be something to keep in
> mind. A simple container of multipart/mixed, then a list of possible
> alternatives in order of preference.

I do not think there is many scenarios where there would be multiple
alternatives,
it would probably always be intended XML code, and possibly a fallback render.

I'd prefer some even simpler augmentation of what we already have, along the
lines of Cyrille's projection tag, or perhaps even make the projection/
fallback/cache rendering reference just an attribute of the
filter/stack/layer.

We should permit fallbacks as a subelement of all possible OpenRaster XML
elements, and that it would be encouraged to make this information survive an
load/edit/save cycle. Making a language on top which is what the try/catch like
approach reminds me of seems contrary to that. The idea of multiple alternative
fallbacks also seem more complex than necessary.

It should be possible to use and possibly exchange and to some extent modify
files with other users that do not have the same plug-ins (and perhaps even
different versions of the same plug-ins) without resorting to a central
repository. A file saved with maximum portability would be huge, and I also
wonder what needed extra support in user interfaces would be needed to tune
such detailed control over what renderings are retained when opening a file.

There is currently no "render" element in OpenRaster. I think we need
one and I'm using it the following hypothetical examples:

<image w='512' h='384'>
    <stack>
      <cache src='caches/stack-1f3a.png' />
      <filter type='gegl:unsharp-mask'>
          <cache src='caches/gegl-unsharp-mask-2bf1.png' version='gegl-0.1'/>
          <params>
              <param name='std-dev'>4.8</param>
              <param name='scale'>2.0</param>
          </params>
      </filter>
      <render type='gegl:checkerboard'>
          <cache src='caches/gegl-checkerboard-01b2.png' version='gegl-0.1'/>
          <params>
              <param name='x'>20</param>
              <param name='y'>20</param>
              <param name='color1'>rgb(0.2,0.2,0.2)</param>
              <param name='color2'>rgb(0.4,0.4,0.4)</param>
          </params>
      </render>
  </stack>
</image>

Or perhaps even the shorter:

<image w='512' h='384'>
    <stack cache='caches/1f3a.png'>
        <filter type='gegl:unsharp-mask' cache='caches/2bf1.png'>
          <params>
              <param name='std-dev'>4.8</param>
              <param name='scale'>2.0</param>
          </params>
      </filter>
      <render type='gegl:checkerboard' cache='caches/01b2.png'
cache-version='gegl-0.1'>
          <params>
              <param name='x'>20</param>
              <param name='y'>20</param>
              <param name='color1'>rgb(0.2,0.2,0.2)</param>
              <param name='color2'>rgb(0.4,0.4,0.4)</param>
          </params>
      </render>
  </stack>
</image>

/Øyvind K.
-- 
«The future is already here. It's just not very evenly distributed»
                                                 -- William Gibson
http://pippin.gimp.org/                            http://ffii.org/


More information about the CREATE mailing list