Image size too large for nexus 7?

I have 1092 x 1596 2.23mb png , which I want to set as a background for my activity. It works when I test it with galaxies s and galaxy 2 tab 10.1, but when I test it with connection 7, I get an error message:

 11-30 08:37:36.961: W/OpenGLRenderer(25918): Bitmap too large to be uploaded into a texture (1454x2125, max=2048x2048) 

Anyone have any suggestions? Should I not use such a large image for the background?

+4
source share
2 answers

Perhaps the image is scaled for the nexus 7 device due to where you put it in your res/drawable .

Try moving the image to the res/drawable-xhdpi and try again, it will reduce the image a bit, and not to the Nexus 7 display (Nexus 7 tvdpi display , while I consider the two galaxy devices that you use are mdpi , so the image may not scale for them if you already place it in the mdpi folder.)

In addition to what @ Qw4z1 says about using images that are too large, that's for sure. Try to create resources of different sizes for each available density folder and from there, much more efficiently, and also lead to a reduction in the size of the .apk file.

+6
source

Umm .. Doesn't this error code say that you have a 1454x2125 image? 2125> 2048 afaik.

To answer your question, yes, this is a bad idea. Some devices simply cannot handle images that are too large.

Check out this SO question for more details on this.

+2
source

All Articles