[CREATE] OpenRaster core XML pondering (Re: OpenRaster page)

Jon Phillips jon at rejon.org
Mon Aug 21 14:05:19 PDT 2006


On Mon, 2006-08-21 at 22:45 +0200, Cyrille Berger wrote:
> > Cyrille, do you have documentation of the new krita format on-line?
> hum no :( it's the whole point of openraster, to have something documented ;) 
> (btw s/new/current/ ;) )
> 
> > Hopefully we can compare the two continuously and push for merging, or
> > at least hope for it :)
> 
> Here is an example taken from one of my image:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE DOC PUBLIC "-//KDE//DTD krita 
> 1.3//EN" "http://www.koffice.org/DTD/krita-1.3.dtd">
> <DOC xmlns="http://www.koffice.org/DTD/krita" syntaxVersion="1" editor="Krita" 
> depth="1" >
>  <IMAGE y-res="100" width="1000" mime="application/x-kra" profile="sRGB 
> built-in - (lcms internal)" height="650" colorspacename="RGBA" name="unnamed" 
> x-res="100" description="" >
>   <LAYERS>
>    <layer x="0" y="0" compositeop="normal" layertype="paintlayer" locked="0" 
> colorspacename="RGBA" opacity="255" name="Colors" filename="layer0" 
> visible="1" />
>    <layer x="0" y="0" compositeop="normal" layertype="paintlayer" locked="0" 
> colorspacename="RGBA" opacity="255" name="Outlines" filename="layer1" 
> visible="1" />
>    <layer x="0" y="0" compositeop="normal" layertype="grouplayer" locked="0" 
> opacity="255" name="Scrambled TV Image" visible="1" >
>     <LAYERS>
>      <layer x="0" y="0" compositeop="normal" layertype="paintlayer" locked="0" 
> colorspacename="RGBA" opacity="255" name="Noise" filename="layer2" 
> visible="1" />
>      <layer x="0" y="0" compositeop="normal" layertype="paintlayer" locked="0" 
> colorspacename="RGBA" opacity="255" name="TV Image" filename="layer3" 
> visible="0" >
>       <ExifInfo>
>        <ExifValue ifd="2" numerator0="1203" components="1" type="5" 
> denominator0="256" name="ApertureValue" />
> 	...
>       </ExifInfo>
>      </layer>
>     </LAYERS>
>    </layer>
>    <layer x="0" y="-229" compositeop="normal" layertype="paintlayer" 
> locked="1" colorspacename="RGBA" opacity="140" name="draft" filename="layer4" 
> visible="0" />
>    <layer x="0" y="-229" compositeop="normal" layertype="paintlayer" 
> locked="1" colorspacename="RGBA" opacity="255" name="Background" 
> filename="layer5" visible="1" />
>   </LAYERS>
>  </IMAGE>
> </DOC>
> 
> as you can see it's close to pippin's work, except it's a bit messy... LAYERS 
> should be replaced to layergroup, but it was done this way for backward 
> compatibility.

Really, I think it makes sense that layers can contain multiple
layers...no need for layergroups IMO.

> 
> The next example does something close to what pippin's xml does:
> 
> <DOC xmlns="http://www.koffice.org/DTD/krita" syntaxVersion="1" editor="Krita" 
> depth="1" >
>  <IMAGE y-res="100" width="1000" mime="application/x-kra" profile="sRGB 
> built-in - (lcms internal)" height="600" colorspacename="RGBA" name="unnamed" 
> x-res="100" description="" >
>   <LAYERS>
>    <layer filtername="brightnesscontrast" x="0" y="0" compositeop="normal" 
> filterversion="1" layertype="adjustmentlayer" locked="0" opacity="255" 
> name="Brightness / Contrast" filename="layer0" visible="1" />
>    <layer filtername="invert" x="0" y="0" compositeop="normal" 
> filterversion="0" layertype="adjustmentlayer" locked="0" opacity="255" 
> name="Invert" filename="layer1" visible="1" filename="mask" />
>    <layer x="0" y="0" compositeop="normal" layertype="paintlayer" locked="0" 
> colorspacename="RGBA" opacity="255" name="Layer 1" filename="layer2" 
> visible="1" />
>   </LAYERS>
>  </IMAGE>
> </DOC>
> 
> Note, that pippin's effect are in krita layers, with the value "filtername" 
> (layer filtername="brightnesscontrast" is an effect). The "invert" effect is 
> associated to a mask which restrict the effect area.

Pippin, what do you think of this approach?

Jon

-- 
Jon Phillips

San Francisco, CA
USA PH 510.499.0894
jon at rejon.org
http://www.rejon.org

MSN, AIM, Yahoo Chat: kidproto
Jabber Chat: rejon at gristle.org
IRC: rejon at irc.freenode.net

Inkscape (http://inkscape.org)
Open Clip Art Library (www.openclipart.org)
Creative Commons (www.creativecommons.org)
San Francisco Art Institute (www.sfai.edu)



More information about the CREATE mailing list