Cleaning [skip ci]
Define a hard limit on image size

This maintains some level of performance when GL_MAX_TEXTURE_SIZE is huge (e.g. on a Genymotion emulator).
Update Gradle version [skip ci]
Use default image max if we can't get the texture size
Updated error handling