im having this issue loading a webp on Imageview only on Android 7 to 4.4, i tried using the new webp library but same error:
i have a try catch
B4X:
Try
'new webp lib
Dim WebP1 As WebP
WebP1.Initialize
Dim bmpbitmap As B4XBitmap=WebP1.LoadWebP(File.ReadBytes(File.DirInternalCache, Filename))
''Dim bmp As B4XBitmap = LoadBitmapResize(File.DirInternalCache,Filename ,ImageView.Width,ImageView.Height,True)
ImageView.SetBitmap(bmpbitmap)
anim.Start(ImageView)
ImageView.SetVisibleAnimated(200,True)
Catch
LogColor("Error",0xFFFF0000)
Log(LastException)
Log(LastException.Message)
End Try
I already have webps uploaded in my server , i use it in a Lazy loading list, would be a hard work for older devices to convert the images live, also i dont think it are supported(animated webp to gif)
I see, in Android 9+ it don't show the animation, only shows the first frame, that i was expecting on older Android using the webp library, maybe i need to switch to static webp.
@Erel Is there a way to extract the first frame from a webp in order to show a preview picture, now animated webps are only shown(first frame) on Android 9+ but on lower android it appears only white.