[Oberon] FPGA - Grapes.Pict - structure
Tomas Kral
thomas.kral at email.cz
Sun Sep 24 20:26:03 CEST 2017
On Mon, 11 Sep 2017 14:06:09 +0200
Jörg <joerg.straube at iaeth.ch> wrote:
> Hi
>
> If depth = d, the color palette following the "depth" field has 2^d
> entries of three bytes. (R, G, B)
> As in your case depth = 1, you have two entries
> Color0 = E0, 3E, 92
> Color1 = 82, 80, 17
> then the run length encoded data starts (d4, 00...)
>
> See Pictures.Open or Pictures.Load to see how picture files are
> decoded.
>
> br
> Jörg
Hi,
I am struggling with `LoadRLE' procedure, interesting, RLE should be the
easy thing among other compressions after all.
I got as far as decompressing run lenghts, but have problems to map
them to pixels and colours.
Each run is denoted by a KEY byte, and processing depends on condition
if KEY <128 or >=128.
These are a few runs for `Grapes.Pict', {run-1, byte, key}, but
what are their meanings?
45 00 KEY>=128
Repeat 46 pixels of colour `0'? Or is the `0' index into colour table?
00 00 KEY<128
Repeat 1 once pixel colour `0'?
05 05 KEY<128
03 03 KEY<128
Here I am lost, `3' or `5' cannot be index into colour table, as B&W
pictures of depth=1 have only two entries in the table.
02 FF KEY>=128
And the above, repeat 3 times pixel colour `FF'?
Many thanks in advance.
--
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon
mailing list