C cyiwin Active Member Licensed User Longtime User Jun 5, 2013 #1 How do you find out how much memory your program gets to work with? Also how do you find out how much memory your program uses? I ask because my program has been down samplings bitmaps. That's better than an out of memory error but it seems to be slowing the app down. I need to know how big my 84 KB png gets when it is turned into a bitmap so I can adjust them before using them. Thanks
How do you find out how much memory your program gets to work with? Also how do you find out how much memory your program uses? I ask because my program has been down samplings bitmaps. That's better than an out of memory error but it seems to be slowing the app down. I need to know how big my 84 KB png gets when it is turned into a bitmap so I can adjust them before using them. Thanks
Erel B4X founder Staff member Licensed User Longtime User Jun 5, 2013 #2 It is difficult to find this information especially as Bitmaps use native memory. You should use LoadBitmapSample to load images. The memory required to load an image is based on the image size (width x height). Upvote 0
It is difficult to find this information especially as Bitmaps use native memory. You should use LoadBitmapSample to load images. The memory required to load an image is based on the image size (width x height).
C cyiwin Active Member Licensed User Longtime User Jun 5, 2013 #3 Thanks for the info, too bad it's hard to monitor the memory usage especially since it seems to be so limited. I'm converting all my LoadBitmaps to LoadBitmapSamples but I'm curious if it is necessary to do in my case? All my bitmaps are on ImageViews which I've already set the %x and %y size limits in the designer script. Does that already limit the size of the bitmap? Upvote 0
Thanks for the info, too bad it's hard to monitor the memory usage especially since it seems to be so limited. I'm converting all my LoadBitmaps to LoadBitmapSamples but I'm curious if it is necessary to do in my case? All my bitmaps are on ImageViews which I've already set the %x and %y size limits in the designer script. Does that already limit the size of the bitmap?
Erel B4X founder Staff member Licensed User Longtime User Jun 5, 2013 #4 The designer will not downsample images automatically (unless there isn't enough memory). Your best option is to make sure that the images sizes match the views. Upvote 0
The designer will not downsample images automatically (unless there isn't enough memory). Your best option is to make sure that the images sizes match the views.
C cyiwin Active Member Licensed User Longtime User Jun 5, 2013 #5 Thanks, and I'm getting a lot fewer down sampling messages. It almost seems like you should always use LoadBitmapSample. Really enjoying Basic4android! Upvote 0
Thanks, and I'm getting a lot fewer down sampling messages. It almost seems like you should always use LoadBitmapSample. Really enjoying Basic4android!