I have to display some pictures in an ImageView. Some of them may have a resolution too high that gives me
W/OpenGLRenderer﹕ Bitmap too large to be uploaded into a texture (3744x5616, max=4096x4096)
I used this method to detect this situation:
public boolean isResTooHigh() {
int[] maxSize = new int[1];
GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSize, 0);
return (maxSize[0] < width) || (maxSize[0] < height);
}
where width and height are provided by the source of the pictures.
But now on my Nexus 4 running Lollipop and my emulators, maxSize[0] is always 0. So, how do I detect this problem?