Reply To: Brick-Simulator?

HomeForumsMonoBrick EV3 FirmwareBrick-Simulator?Reply To: Brick-Simulator?

#3842
Author Image
Anders Søborg
Keymaster

Hi Matin

I think your project is really exciting.

still fighting with Lcd: I cannot convert the byte-array to an image/bitmap.
Since Width=178 and Height=128, why is the dispbuffer-size = 2944 bytes, when 178*128/8 = 2848 bytes?

The buffer size is not 2944 since each pixel is masked. bytesPrLine=(178+7)/8 = 23. So the buffer is 23*128=4096. This is taken from the following code:


public const int Width = 178;
public const int Height = 128;
const int bytesPrLine = (Width+7)/8;
const int bufferSize = bytesPrLine * Height;
const int hwBufferLineSize = 60;
const int hwBufferSize = hwBufferLineSize*Height; 

Also you should have a look at the set and get pixel functions…

Maybe I don’t understand your question

Anders

Posted in

Make a donation