[CREATE] OpenRaster fallbacks (proposal/RFC)
martinxyz at gmx.ch
Sat Aug 29 13:01:01 PDT 2009
On Tue, Aug 18, 2009 at 06:10:42PM +0200, Cyrille Berger wrote:
> On Sunday 09 August 2009, Martin Renold wrote:
> > New pixel formats:
> > As it is now, we need to use different attributes to save the "legacy" and
> > the new file format side-by-side in a compatible way. For example:
> > <layer src="data/layer001.png" src_16bit="data/layer001_16bit.png"/>
> > and also for fallbacks:
> > <cache src="caches/checkerboard.png" src_float='caches/checkerboard.dat'/>
> > Essentially, the specification needs to be updated to state that src=...
> > attributes can only point to 8bpc PNG images, and all other formats need
> > other attributes. Ugly? Acceptable? Alternatives?
> I think it would work with fallback
> <layer src="data/layer001_16bit.png">
> <fallback src="data/layer001.png" />
Maybe it's a bit ugly to require an application that can't deal with 16bit
PNGs to recognize them by opening them...?
I have now tested 16bit PNG layers. Krita and MyPaint seem to convert it to
8bpc and load the file. DrawPile shows an error and doesn't load anything.
The question that I was asking myself was: how could MyPaint (or any
application) start saving data with more than 8bpc into OpenRaster files
today, such that they also load correctly in all existing OpenRaster
implementations? And if that's not possible, what can OpenRaster provide to
prevent such breakage with every new feature that gets added in the future?
> > Layer modes:
> > Would a compositing mode other than OVER be implemented as an <effect> in
> > OpenRaster? Or would the mode be part of the <layer> tag, which then can
> > also have a fallback? If so, can a <stack> tag also have a compositing
> > mode?
> I am more for the <layer> tag. And defaulting to OVER.
Okay, most applications work that way. But what would the fallback of a
layer be? Let's say I have a 64bit floating point layer with some
compositing mode other than OVER that is not implemented in all
applications. Would the 8bpc fallback contain the layer data or the
composited image stack? Doesn't seem to work...
> > Filter/Renderer variants:
> > Implementation might like to have a way to decide whether they can render
> > something without fallback. This can be solved with version=...
> > attributes.
> I don't follow you, you mean different version of the filter ?
I was thinking about adding attributes to an existing filter. But maybe
filters should be specified such that the application needs to verify all
attributes. If not, it cannot render it correctly and should use the
fallback (and/or warn the user).
More information about the CREATE