You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've used many years always png type for drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi.
Last year I've started to use Android Studio for converting images to webp for space saving in Xamarin.Forms projects. It's not so dramatical difference but few MBs can be saved thanks to this. I believe there will be released Xamarin Android projects with larger amount of images (or larger sizes) and they will have to convert to MAUI after Xamarin Forms discontinuation.
This will lead them to:
WebP used: They will have to add them directly to drawable folders and leave MauiImage benefits. (Bundle size saved | No MAUI benefits of MauiImage)
WebP used: They want to use MauiImage benefits (Bundle size increases | Better image management)
WebP wasn't used: they will be on +- same sizes as earlier. (Bundle size same (+-) | Better image management)
They haven't used webp because there was no space to try it
I am currently deciding manually what will be png or webp. I believe that there could be a logic that decides like if size is > 300x300 and 30 kB (for a specific dpi size) then convert or just leave it to user to select which MauiImages will be converted. I haven't tried to convert all images because icons even as png have minimal sizes (0,5 kB - 4 kB for xxxhdpi).
Why have I mentioned Android and not iOS?
-> Same reason as lightning cable usage until iPhone 15, bluetooth limitations and etc. Apple supports webp since iOS 14 and MAUI support declares iOS 11 and higher. It took them only 7 years.
I believe that this has some potential to continue with MAUI.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
is there an idea to process MauiImage to webp? I am asking because of possible file size savings and I couldn't find mention about this topic.
Android supports webp - lossy since API 4.0 (API level 14) and lossless since 4.3 (API level 18). (I know it's developed by Google)
Example: Android Studio for webp conversion - Size comparison
SVG: 99 kB
MAUI converted to png (drawable-xxxhdpi): 282 kB
75% quality: 81 kB
Lossless: 121 kB
We've used many years always png type for drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi.
Last year I've started to use Android Studio for converting images to webp for space saving in Xamarin.Forms projects. It's not so dramatical difference but few MBs can be saved thanks to this. I believe there will be released Xamarin Android projects with larger amount of images (or larger sizes) and they will have to convert to MAUI after Xamarin Forms discontinuation.
This will lead them to:
There will be propably a bit higher CPU usage than for png but performance/cost looks much better for webp.
greenspector.com: webp/png/jpeg energy battle on Android
I am currently deciding manually what will be png or webp. I believe that there could be a logic that decides like if size is > 300x300 and 30 kB (for a specific dpi size) then convert or just leave it to user to select which MauiImages will be converted. I haven't tried to convert all images because icons even as png have minimal sizes (0,5 kB - 4 kB for xxxhdpi).
Why have I mentioned Android and not iOS?
-> Same reason as lightning cable usage until iPhone 15, bluetooth limitations and etc. Apple supports webp since iOS 14 and MAUI support declares iOS 11 and higher. It took them only 7 years.
I believe that this has some potential to continue with MAUI.
Thanks,
Dominik Švarc
Beta Was this translation helpful? Give feedback.
All reactions