Hi, EDIT(2), hexdumping `Grapes.Pict' 00000000 03 f0 - signature=$0f03 00000002 68 01 d6 00 01 00 - width=$0168, height=$00d6, depth=$0001 (B&W) 00000008 e0 3e 92 82 80 17 d4 00 d4 00 d4 00 d4 00 d4 00 - colour table? R,G,B = {byte}{byte} colour = {R|G|B} table = colour[0..255] Then I am lost, which offset bitmap data starts? How to determine if it is `RLE' compressed? Why we record the same width, twice? B.width := width; B.wth := width; Tomas -- Tomas Kral <thomas.kral@email.cz>
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 -----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Tomas Kral Sent: Monday, September 11, 2017 11:38 AM To: Oberon@ <lists.inf.ethz.ch.Oberon@lists.inf.ethz.ch> Subject: [Oberon] FPGA - Grapes.Pict - structure Hi, EDIT(2), hexdumping `Grapes.Pict' 00000000 03 f0 - signature=$0f03 00000002 68 01 d6 00 01 00 - width=$0168, height=$00d6, depth=$0001 (B&W) 00000008 e0 3e 92 82 80 17 d4 00 d4 00 d4 00 d4 00 d4 00 - colour table? R,G,B = {byte}{byte} colour = {R|G|B} table = colour[0..255] Then I am lost, which offset bitmap data starts? How to determine if it is `RLE' compressed? Why we record the same width, twice? B.width := width; B.wth := width; Tomas -- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On Mon, 11 Sep 2017 14:06:09 +0200 Jörg <joerg.straube@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@email.cz>
participants (2)
-
Jörg -
Tomas Kral