subsampling-scale-image-view
subsampling-scale-image-view copied to clipboard
W/OpenGLRenderer: Bitmap too large to be uploaded into a texture (700x3959, max=2048x2048)
Adding image the same as in tutorial, and getting same error, as on other image views.
What's wrong?
Please post your code. I can't help if you delete the issue template.
Here is code: https://gist.github.com/creotiv/29a257e99299670e51434196687169db
I'm trying to create module for react-native.
so the interesting part here is the size of the picture that trying to put into texture. Original image is 900x5000, But on some devices i see W/OpenGLRenderer: Bitmap too large to be uploaded into a texture (4500x28000, ... So for some reason picture upscale in 4-6 times.
I saw same behaviour when i tried to use https://github.com/DylanVann/react-native-fast-image lib
i tested on various devices and it doesnt corelate to Android version nor screen resolution. Ive tested from mhdpi to xxxhdpi and Android 5.1.1 to Android 10.
For example samsung N915F is giving crash, at the same time Blackview BV7000 is working fine
https://www.blackview.hk/blackview-190/ https://www.phonemore.com/specs/samsung/galaxy-note-edge/sm-n915f/
I don't know what URI you're using. If you're using a resource, Android may scale it. Store images in assets, or at least in drawable-nodpi.
im using file from phone like /sdcard/..
Also setting view to the software acceleration doesn't solve a problem(i think it can be rewrited in Canvas)