[Openicc] Fwd: Settings bundles (Robert Krawitz, Edmund Ronald)

Kai-Uwe Behrmann ku.b at gmx.de
Fri Feb 18 23:36:42 PST 2011


Am 19.02.11, 08:05 +0100 schrieb Kai-Uwe Behrmann:
> Am 19.02.11, 12:43 +1100 schrieb peters at skarpetis.com:
>> On 19/02/2011, at 12:30 PM, Robert Krawitz <rlk at alum.mit.edu> wrote:
>>> On Fri, 18 Feb 2011 18:54:16 +0100, edmund ronald wrote:
>>>> Actually, we expect the format to be parsed - and subtrees copied and
>>>> pasted - by humans like YOU. But using XML doesn't mean that it has to
>>>> be as horrible as what you describe.
>>>> 
>>>> I'll ask Robert to paste a sample of today's XML curve representation
>>>> here so you can judge for yourself.
>>> 
>>> Certainly.
>>> 
>>> <curve wrap="wrap" type="linear" gamma="0" piecewise="false">
>>> <sequence count="48" lower-bound="-6" upper-bound="6">
>>>    0    0    0    -0.02    -0.04    -0.08    -0.12    -0.16
>>>    -0.2    -0.24    -0.28    -0.32    -0.32    -0.32    -0.32    -0.32
>>>    -0.36    -0.4    -0.44    -0.48    -0.5    -0.45    -0.4    -0.3
>>>    -0.12    -0.07    -0.04    -0.02    0    0    0    0
>>>    0    0    -0.03    -0.06    -0.09    -0.13    -0.17    -0.21
>>>    -0.25    -0.22    -0.19    -0.16    -0.13    -0.1    -0.07    -0.03
>>> </sequence>
>>> </curve>
>> 
>> 
>> That is definitely compact and lacks the usual XML bloat. Not as elegant 
>> for the die hard XMLers though as it lacks that deep tree structure.
>
> Not directly related, but
> How would this fit into a profile data base? Can we put this XML string 
> inside a JSON keys value inside the DB?

After some search I found, JSON could wrap that as a blob:
{
    "devices": {
      "printer": {
        "1": {
          "model": ["A", "C, "D"],
          "ICC_PROFILE": 
"/home/graeme/.local/share/color/devices/printer/prt1.icc"
        },
        "2": {
          "model": ["B"],
          "Gutenprint_curve": "<curve wrap="wrap" type="linear" gamma="0" piecewise="false">
<sequence count="48" lower-bound="-6" upper-bound="6">
    0    0    0    -0.02    -0.04    -0.08    -0.12    -0.16
    -0.2    -0.24    -0.28    -0.32    -0.32    -0.32    -0.32    -0.32
    -0.36    -0.4    -0.44    -0.48    -0.5    -0.45    -0.4    -0.3
    -0.12    -0.07    -0.04    -0.02    0    0    0    0
    0    0    -0.03    -0.06    -0.09    -0.13    -0.17    -0.21
    -0.25    -0.22    -0.19    -0.16    -0.13    -0.1    -0.07    -0.03
</sequence>
</curve>"
          "ICC_PROFILE": 
"/home/graeme/.local/share/color/devices/printer/prt2.icc"
        }
      }
    }
}

Its a modified example from ucmm[1].

>> This is the kind of thing we need though. compact yet still hackable. Now 
>> if someone could just agree on the  the contents and their use, we are all 
>> set.


kind regards
Kai-Uwe Behrmann
-- 
developing for colour management 
www.behrmann.name + www.oyranos.org


[1] http://lists.freedesktop.org/archives/openicc/2008q2/001615.html



More information about the openicc mailing list