[F100] Basic GIF animation support #1704
Comments
Maybe a event for FinishedPlaying |
GIF is considered inefficient today. MP4 videos are preferred, because they have much much smaller size than animated GIF, and great quality. |
This will probably be absorbed by #1692 but just to frame this issue the motivation was for chat apps and very simple playback. So user a sends user b a hilarious cat/dog gif they can watch. |
@PureWeen I see, emojis / emoticons you mean. That might make sense, they should be very small, not sure. |
@PureWeen First incarnation of this will not implement caching or streaming of GIF's so implementation will focus on small GIF's. For larger GIF's, solution will need to be extended with at least streaming support keeping a smaller subset of decoded frames in memory at the same time. |
Sounds good .. Caching definitely needs its own issue for discussion and implementation across the whole image system. This PR for 3.0.0 Here's a cool binding Jonathan Peppers put together for GlideX |
Initial implementation proposal, #2202 . |
Rationale
Animated Gifs are popular. Providing the image view with features that allowed it to animate gifs would allow users to not have to use webviews or create other custom renderers
Implementation
Add an AnimationPlayBehaviorProperty for the Image control which indicates that a gif should start playing once it has loaded or if it should be started through other mechanisms.
Add two methods for starting and stopping the animation
Expected Result
Android
If user has specified they want the animation to play onload or they call StartAnimation then start playing the gif animation
iOS
See Android
UWP
See Android
Implications for CSS
Backward Compatibility
Ensure the way the current Image control processes gifs does not change unless the user opts in for the given properties
Difficulty : Medium
Work that's been done
https://forums.xamarin.com/discussion/17448/animated-gif-in-image-view
https://github.com/jamesmontemagno/PuppyKittyOverflow/blob/master/PuppyKittyOverflow.Touch/AnimatedImageView.cs
https://github.com/jamesmontemagno/GifImageView-Xamarin.Android
https://github.com/luberda-molinet/FFImageLoading/pull/470/files
The text was updated successfully, but these errors were encountered: