Android Question Is there size limitation in SetBackgroundImage?

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I am trying to set background image for panel/imageview with SetBackgroundImage method.
It was failed when using image file (jpg file) with size about 2.5MB.

Is there any size limitation? If there is a limit, what is the max size limit to works correctly?

Thanks in advance.
 

LucaMs

Expert
Licensed User
Longtime User
I have loaded a picture of 2.87 Mb in this way without any problems.

B4X:
Private bmp As Bitmap
bmp.Initialize(File.DirAssets, "TestFile.jpg")
Private bmd As BitmapDrawable
bmd.Initialize(bmp)
Panel1.Background = bmd

However, remember that you can use LoadBitmapSample
 
Upvote 0
Top