I have a 1092 x 1596
2.23mb png
that I want to set as the background for my activity. It works when I test it with a galaxy s, and galaxy tab 2 10.1, but when I test it with a nexus 7, I get an error:
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 be using such a large image for the background?
Perhaps the image is being scaled up for the nexus 7 device because of where you've put it in your res/drawable
folders.
Try moving the image to the res/drawable-xhdpi
folder and try again, this should scale the image down a bit rather than up to the Nexus 7 display (Nexus 7 display is tvdpi, whereas I believe the two galaxy devices you use are mdpi, so the image might not get scaled up for those if you are already placing it in the mdpi folder.).
Other than that though, what @Qw4z1 says about using images that are too large is exactly correct. Try creating resources of different sizes for each drawable density folder and going from there, much more efficient, and will lead to a smaller .apk filesize as well.
Uhm.. Doesn't that error code say that you image is 1454x2125? 2125 > 2048 afaik.
To answer your question, though, yes it is a bad idea. Some devices just can'n handle too large images.
Check this SO question for more details on the subject.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With