I'm receiving the infamous OpenGLRenderer
error that "Bitmap too large to be uploaded into a texture."
I'm familiar with the error and know that I need to keep my images below 2048 pixels
to avoid it.
However, on one particular phone, the Samsung Galaxy Nexus, it is reporting image sizes that are twice the actual image size.
My image is in the drawable
folder and has a size of 2048x95
. When I run the app and attempt to add that image to the display, I get the infamous error:
Bitmap too large to be uploaded into a texture (4096x190, max=2048x2048)
What gives?
If your image is in the drawable folder then it will be scaled to the appropriate density depending on the device. This means for mdpi devices, your image will be the appropriate dimensions but for hdpi, xhdpi, and xxhdpi that your image will be much larger than you think and ldpi devices the image will be smaller.
If you don't want the image to scale like that on the Galaxy Nexus then place it in the drawable-xhdpi folder.
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