panpf / zoomimage

ZoomImage is an gesture zoom viewing of images library specially designed for Compose Multiplatform and Android View. Supported scale, pan, locate, rotation, and super-large image subsampling.
Apache License 2.0
340 stars 19 forks source link

Subsampling not supported for AVIF, TIFF, DNG (and maybe more) (Sketch) #44

Closed IacobIonut01 closed 1 month ago

IacobIonut01 commented 1 month ago

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:

Affected components

Select of the components below:

Versions

Running Devices

Sample code

Use the SketchZoomAsyncImage and a media uri as source Example images: samples.zip

Reproduction steps

Expected behavior

panpf commented 1 month ago

Received.

panpf commented 1 month ago

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