[Oberon] Display Integer Matrix as Raster Image

Jörg Straube joerg.straube at iaeth.ch
Wed Sep 12 19:02:07 CEST 2018


Sorry, forget 2^24 and 2^32 as INTEGERs in ETH Oberon are only 16 bit.

The easiest way is probably:
VAR
  col: Display.Color;
  rgb565: INTEGER;
  a: ARRAY 1000, 1000 OF INTEGER;

FOR y := 0 TO 999 DO
  FOR x := 0 TO 999 DO
    rgb565 := a[x,y];
    col := Display.RGB(
        rgb565 DIV 2048,
        rgb565 DIV 32 MOD 64,
        rgg565 MOD 32
    );
    Display.Dot(col, x, y, Display.replace)
  END
END

Jörg

> Am 12.09.2018 um 18:15 schrieb Jörg Straube <joerg.straube at iaeth.ch>:
> 
> Dieter
> 
> Before trying to give a possible solution, I have some questions:
> -  What is the range of values of your integers? 0..2^8, 0..2^16, 0..2^24, 0..2^32
> - What do you expect to be displayed on screen?
> - How big is your screen?
> - How many colors do you have?
> 
> br
> Jörg
> 
>> Am 12.09.2018 um 16:43 schrieb Dieter <d.gloetzel at web.de>:
>> 
>> Is there a simple way with ETHOberon (System 3 on Windows) to display a large integer matrix (e.g. 1000 * 1000) as a raster image on screen?
>> 
>> Thanks and regards,
>> Dieter
>> --
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>> https://lists.inf.ethz.ch/mailman/listinfo/oberon
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list