Hello MariamSohail,
Can two different external bitmaps on a single screen access EwLoadExternBitmap() without any issues?
from EW point of view there is no problem. You can use as many Extern Bitmap objects simultaneously in your project as available memory. For example, you can display several JPEGs simultaneously.
Technically, each Extern Bitmap object will invoke EwLoadExternBitmap() function asking for the desired image content. Which content should be provided is identified by the parameter aName of EwLoadExternBitmap() function. The parameter corresponds to the value you specify in the property Name of the respective Extern Bitmap object. See also Specify the content of the Extern Bitmap object.
Also what if for one of the external bitmap I don't have a file path, instead I have raw pixel data vector from a function coming! Do you have any suggestions for such a case? should I also handle the case with raw pixel data vector (without file path) inside the EwLoadExternBitmap()?
EwLoadExternBitmap() does not depend on a file system, file name or any particular image format. If the data source is some memory containing raw pixel data, you can implement EwLoadExtrernBitmap() to directly decode this data. If the raw pixel data is not encoded (it contains already the 'raw' pixel) you can even copy the data into the locked EW bitmap memory. Please note, that if the color format of the raw pixel data is different from the color format of the EW bitmap, you will need to apply an appropriate color conversion on the pixel RGB(A) channels as explained in the chapter Take in account the color format of the bitmap.
Now, let assume you have multiple raw pixel data arrays (each containing different image). In such case you use aName parameter of EwLoadExternBitmap() to select the right array. You could, for example, manage a list of available raw pixel data arrays (= a list of images) with each entry in the list being identified by a unique name. The EwLoadExternBitmap() function searches then within this list for the entry matching aName and, if found, processes its raw pixel data. It is like a simple file system.
I hope it helps you further.
Best regards
Paul Banach