I'm stuck trying to display a high resolution png image (6000x3000) in a WebView
. I have the picture in a String (here called mimeString) encoded in Base64, that I have extracted from a file. I then simply use:
webView.loadData(mimeString, "image/png", "base64");
It works fine when the image has a moderate resolution (under 1MP), but with higher quality pictures, you can see pixelization due to some kind of down sampling. I would like to be able to get the full details when I zoom in my WebView
.
I'm sure the string in base64 corresponds to the full resolution picture because I've tested it on in my web browser and the resolution is perfect.
Here is the pic in full resolution:
Here is what I get on my tablet:
As you can see it is very annoying because the picture has to be precise to the pixel! Moreover I have tried to display these pictures in other ways than WebView
, but it is the only way I found to have a good zooming widget that doesn't explode with an OOM as soon as the quality of the pictures becomes to big.