hardcore-sushi / DroidFS

Encrypted overlay filesystems implementation for Android. Also available on gitea: https://forge.chapril.org/hardcoresushi/DroidFS
GNU Affero General Public License v3.0
654 stars 44 forks source link

support .avif image format #316

Open mubarokila opened 1 month ago

mubarokila commented 1 month ago

I noticed that DroidFS can’t open .avif images right now, Is there a possibility of adding support for the .avif format in the future?

hardcore-sushi commented 1 month ago

Sure, I just added the avif extension: 88bd746359eeca16ca83a7adc1efe495d52d3f7b Feel free to suggest other extensions if more are missing.

Unless you compile the app from source, you'll need to wait for the next DroidFS release for the changes to take effect. In the meantime, you should be able to open AVIF images by clicking on them and selecting "Image" in the "Open as:" popup dialog.

mubarokila commented 4 weeks ago

Thanks for adding the extension, i will try compiling it from source while waiting for the next release.

mubarokila commented 3 weeks ago

@hardcore-sushi I tried to compile it today, but when i open an AVIF image, it just shows black, and the thumbnails aren't showing up either.

hardcore-sushi commented 3 weeks ago

AVIF support might depends on your Android version. What ROM are you running? Also, could you share a logcat of the app after trying to open an AVIF image?

What are the sizes of your images?

mubarokila commented 3 weeks ago

My device is running One UI 4.1 (android 12), the image size is about 88 kB

Here is the log droidfs_log.txt

hardcore-sushi commented 3 weeks ago

Thank you. Unfortunately it looks like a known Android issue: https://github.com/deckerst/aves/issues/895, https://github.com/coil-kt/coil/issues/1295 Are you able to open your AVIF images with other apps?

I encounter the same issue with random images from the internet, but I can open avif images exported from imagemagick or GIMP properly.

mubarokila commented 3 weeks ago

For now, i'm using AVIF Viewer to open AVIF images and there are no issues, my images are mostly the result of conversion using ImageMagick.

hardcore-sushi commented 3 weeks ago

AVIF Viewer use its own internal decoder. Are you able to open AVIF images with other apps that use the native Android decoder, such as the gallery app or a file explorer probably?

mubarokila commented 3 weeks ago

i try open it using Fossify Gallery and there are no issue , its like require avif-integration

refs: FossifyOrg/Gallery#56

hardcore-sushi commented 3 weeks ago

Oh thank you I was not aware of that. I will consider adding avif-integration but I'm afraid this will increase the APK size too much for something that already partially works on some devices.

mubarokila commented 3 weeks ago

I get your worry about the APK size. It could be worth a shot, but if it only works partially on some devices right now, maybe it’s better to wait.