I have a game which does a whole lot of image-scaling (once every time you enter a level). The scaling is done with a simple call to Bitmap.createScaledBitmap(Bitmap). I realize that until the garbage collector comes, I effectively have two copies of these images, but I've tested it to death on several Android devices, and only recently got a Galaxy S3. You would have thought that if a game runs perfectly well on the Xoom2, the Galaxy Tab and the Galaxy S2, to say nothing of lower-end models like the Galaxy Y and Galaxy Ace, it would run even better on the Galaxy S3. Embarrassingly, it doesn't, and all-too-often I run out of memory. I think I've optimized my game about as far as I'm willing to (admittedly, some optimization was called for). I'd like to understand the problem. Does anyone know of any memory-management problems regarding the S3? Is the screen size-RAM ratio worse than on, say, the Galaxy Tab? Thanks in advance.
Asked
Active
Viewed 1,344 times
3
-
Have you taken into account the difference in the resolutions of these devices? The S3 is 1280x720 with 306 ppi density; where as the Xoom is 1280x800 but only 149 ppi. They all come with equal amounts of RAM. – Burhan Khalid Aug 29 '12 at 04:27
-
That just means that the Xoom 2's screen is physically bigger. Image density doesn't mean anything to hardware, only image size does. – AGP Aug 29 '12 at 04:39
1 Answers
1
If you're are scalling imgs you should use .isSampleSize in the BitmapFactory.Options before makes the bpm.

Sergio A.
- 101
- 3