Thursday, November 23rd 2017, 12:00pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

kfir

Beginner

Date of registration: Aug 8th 2017

Posts: 2

1

Monday, October 2nd 2017, 3:08pm

DrawStreamedBitmapEx NumBytesReq is to big

Hello

I use with an external storage bitmap (DTA format) and when i calling the DrawStreamedBitmapEx function, it calling the GetData(...) function, is the value of the NumBytesReq 19600.

So how can i tell to emwin to request less bytes every time.
my screen is 800 pixel so according the emwin guide its recommend for one pixel line that is 1600 bytes

kfir

Beginner

Date of registration: Aug 8th 2017

Posts: 2

2

Tuesday, October 3rd 2017, 12:59pm

RE: DrawStreamedBitmapEx NumBytesReq is to big

Hello

I use with an external storage bitmap (DTA format) and when i calling the DrawStreamedBitmapEx function, it calling the GetData(...) function, is the value of the NumBytesReq 19600.

So how can i tell to emwin to request less bytes every time.
my screen is 800 pixel so according the emwin guide its recommend for one pixel line that is 1600 bytes
I see on the simulation on windows is the NumBytesReq is 6400 (4 rows of the picture 1600*4).


How can i configured how much bytes to request.

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 414

3

Wednesday, October 4th 2017, 2:13pm

Hi,

There is no way to tell the function how many bytes the _GetData() function should ask for.

It requires memory for at least one line which gets allocated from the GUI memory (set in GUIConf.c with GUI_ALLOC_AssignMemory()). emWin checks how much memory is available. If there is enough memory to get the whole image it requests the whole image data at once. If there is not enough memory for the whole image it calls for only one line at once.

Regards,
Sven