Subsampling not supported for AVIF, TIFF, DNG (and maybe more) (Sketch)
IacobIonut01 opened this issue · 2 comments
Describe the bug
As described in the title, the subsampling feature does not work when using different image formats, for example the AVIF, TIFF, DNG and maybe more rich formats does not tile at all when zooming
12:40:00.933 D Image info: ImageInfo(size=7602x2135, mimeType='image/avif')
12:40:00.933 D Active tiles: []
Affected platforms
Select of the platforms below:
- Android
Affected components
Select of the components below:
- SketchAsyncZoomImage
Versions
- zoomimage version*: 1.1.0-beta01
- Kotlin version*: 2.0.20
- Compose version(s)* (Jetpack/Multiplatform): 1.7.2
Running Devices
- Google pixel 6; Android 15 ; arm64
Sample code
Use the SketchZoomAsyncImage and a media uri as source
Example images:
samples.zip
Reproduction steps
- Open Image
- Zoom
- See the blurriness
Expected behavior
- Open Image
- Zoom
- Observe full resolution zoomed spot
Received.
For AVIF format, decoding through BitmapFactory is supported since Android 12, but BitmapRegionDecoder, which relies on subsampling, still does not support avif format until the current Android 15
Until the latest Android 15 version, BitmapFactory and BitmapRegionDecoder do not support TIFF and DNG format images.
I am also actively looking for third-party libraries to support more image formats. If you also have suitable library recommendations, please let me know