Domanda

I have been trying to open webp image in android 4+ webview. here are the links to those images.

https://www.dropbox.com/s/c2fjmlwbyi7r715/10.webp   
 [WEBP 540x960 540x960+0+0 16-bit sRGB 11.9KB 0.030u 0:00.029]

https://www.dropbox.com/s/j0v44ujb8liunt9/14.webp
 [WEBP 540x960 540x960+0+0 16-bit sRGB 29.9KB 0.020u 0:00.029]

In my case 10.webp loads perfectly but 14.webp does not load. So i try to figure out file properties with identify command and the result is in [] above below each links.

what is causing this problem.

È stato utile?

Soluzione

The file image : 10.webp may not have Alpha so it is loading in Android 4+ but your another image image : 14.webp may have Alpha. Image image have Alpha then it will fail to decode natively in Android version prior to JB-MR2 and hence fail to load.

Attaching the same file with alpha stripped, you will be able to load in Android ICS.

One can generate lossy files (without Alpha) from PNG via following command:

    cwebp abc.png -noalpha -o abc.webp

Here is a Issue listed similar to yours.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top