MAUI supports animated GIFs through the Framework. Unfortunately, for iOS, MAUI does not natively support animated WebP images being rendered on the device.
On the native side, iOS has supported the required APIs for animated WebP images since iOS 14. These are very similar to the APIs used within MAUI to render animated GIFs.
Within the framework code, we would need to modify the ImageAnimationHelper.cs in order to not only check for "com.compuserve.gif" and its "GIFDictionary" data, but also check for "com.webmproject.webp" and its "WebPDictionary" data.
I have tested this locally and this will support extraction of WebP data, and utilise the same MAUI mechanism for constructing an animated UIImage object.
Public API Changes
The API would not need to change, as it is just internal processing of .webp images that would be changing.
Intended Use-Case
In my app, I am wanting to not only support GIF files (commonly distributed by sites such as tenor.com) but also WebP files (commonly distributed by sites such as giphy.com).
Description
MAUI supports animated GIFs through the Framework. Unfortunately, for iOS, MAUI does not natively support animated WebP images being rendered on the device.
On the native side, iOS has supported the required APIs for animated WebP images since iOS 14. These are very similar to the APIs used within MAUI to render animated GIFs.
Within the framework code, we would need to modify the ImageAnimationHelper.cs in order to not only check for "com.compuserve.gif" and its "GIFDictionary" data, but also check for "com.webmproject.webp" and its "WebPDictionary" data.
I have tested this locally and this will support extraction of WebP data, and utilise the same MAUI mechanism for constructing an animated UIImage object.
Public API Changes
The API would not need to change, as it is just internal processing of .webp images that would be changing.
Intended Use-Case
In my app, I am wanting to not only support GIF files (commonly distributed by sites such as tenor.com) but also WebP files (commonly distributed by sites such as giphy.com).