Open RainNapper opened 2 years ago
Does it work when you add
testImplementation("org.sejda.imageio:webp-imageio:0.1.6")
along with Paparazzi?
@consp1racy I'm facing the same issue. If I add the library you've mentioned above, test fails:
java.lang.NoClassDefFoundError: Could not initialize class com.luciad.imageio.webp.WebPDecoderOptions
at com.luciad.imageio.webp.WebPReadParam.<init>(WebPReadParam.java:24)
at com.luciad.imageio.webp.WebPReader.getDefaultReadParam(WebPReader.java:147)
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1464)
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1363)
at android.graphics.Bitmap_Delegate.createBitmap(Bitmap_Delegate.java:124)
at android.graphics.Bitmap_Delegate.createBitmap(Bitmap_Delegate.java:108)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:387)
at android.content.res.Resources_Delegate.getDrawable(Resources_Delegate.java:186)
at android.content.res.Resources.getDrawable(Resources.java:845)
at androidx.core.content.res.ResourcesCompat.getDrawable(ResourcesCompat.java:104)
UPD. In my case WebP native library was the cause of the problem, as it's built only for x86_64 on macOS. I've rebuilt it for Apple Silicon and it works fine. On the other platforms it works fine out-of-the-box.
Webp drawable resources are showing up in screenshots broken images (see attached image).
After converting them to .png, they show up as expected, which leads me to believe it's an issue with .webp support.