cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.31k stars 215 forks source link

Assets loaded with ImageDecoder throw a ClassCastException #1717

Open colinrtwhite opened 6 hours ago

colinrtwhite commented 6 hours ago

Description Assets decoded via ImageDecoder.createSource(AssetManager assets, String fileName) throw a ClassCastException when loaded inside Paparazzi. This is because PaparazziAssetRepository returns a FileInputStream and ImageDecoder expects an AssetInputStream.

Steps to Reproduce Attempt to decode an asset with ImageDecoder.createSource(AssetManager assets, String fileName) in Paparazzi.

Expected behavior PaparazziAssetRepository should return an AssetInputStream from PaparazziAssetRepository.

Additional information: