Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[F100] Basic GIF animation support #1704

Closed
PureWeen opened this issue Jan 26, 2018 · 8 comments
Closed

[F100] Basic GIF animation support #1704

PureWeen opened this issue Jan 26, 2018 · 8 comments
Assignees
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. community-sprint F100 in-progress This issue has an associated pull request that may resolve it! roadmap t/enhancement ➕
Milestone

Comments

@PureWeen
Copy link
Contributor

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

public enum ImagePlayBehavior
{
   None,
   OnLoad
}

public static readonly BindableProperty AnimationPlayBehaviorProperty = BindableProperty.Create(nameof(AnimationPlayBehavior), typeof(ImagePlayBehavior), typeof(Image), ImagePlayBehavior.None);

public void StartAnimation();
public void StopAnimation();

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

@pauldipietro pauldipietro added this to New in Triage Jan 26, 2018
@jassmith jassmith added this to Ready for Implementation in Enhancements Jan 26, 2018
@hartez hartez removed this from New in Triage Jan 29, 2018
@rmarinho
Copy link
Member

Maybe a event for FinishedPlaying

@andreinitescu
Copy link
Contributor

GIF is considered inefficient today. MP4 videos are preferred, because they have much much smaller size than animated GIF, and great quality.
There's a separate ticket for adding a MediaElement control, I think that could be a better option.

@PureWeen
Copy link
Contributor Author

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.

@andreinitescu
Copy link
Contributor

@PureWeen I see, emojis / emoticons you mean. That might make sense, they should be very small, not sure.

@lateralusX lateralusX self-assigned this Mar 2, 2018
@lateralusX lateralusX moved this from Ready for Implementation to In Progress in Enhancements Mar 8, 2018
@lateralusX
Copy link
Member

lateralusX commented Mar 22, 2018

@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.

@PureWeen
Copy link
Contributor Author

Sounds good .. Caching definitely needs its own issue for discussion and implementation across the whole image system.

This PR for 3.0.0
#1973
Should help with gifs that are part of the project but gifs coming in as links or other will still cause some memory bloat

Here's a cool binding Jonathan Peppers put together for GlideX
https://github.com/jonathanpeppers/glidex

@lateralusX
Copy link
Member

Initial implementation proposal, #2202 .

@samhouts samhouts added this to Ready in v3.1.0 via automation Apr 12, 2018
@samhouts samhouts moved this from Ready to In Progress in v3.1.0 Apr 12, 2018
@samhouts samhouts added this to In Progress in v3.6.0 May 7, 2018
@samhouts samhouts removed this from In Progress in v3.1.0 May 7, 2018
@samhouts samhouts removed this from In Progress in v3.6.0 May 18, 2018
@samhouts samhouts added this to In Progress in v3.1.0 May 18, 2018
@samhouts samhouts added this to In Progress in v3.6.0 May 18, 2018
@samhouts samhouts removed this from In Progress in v3.1.0 May 18, 2018
@samhouts samhouts removed this from In Progress in v3.6.0 May 21, 2018
@samhouts samhouts added this to In Progress in v3.1.0 May 21, 2018
@samhouts samhouts removed this from In Progress in v3.1.0 May 23, 2018
@samhouts samhouts added this to To do in v3.6.0 via automation Jun 12, 2018
@samhouts samhouts added this to In Progress in v3.2.0 Jun 26, 2018
@samhouts samhouts removed this from In Progress in Enhancements Jun 26, 2018
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 4, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 5, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 5, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 5, 2019
@samhouts samhouts added this to In Progress in v4.5.0 Nov 5, 2019
@samhouts samhouts added this to To do in Sprint 162 via automation Nov 18, 2019
@samhouts samhouts moved this from To do to Ready for Review (Issues) in Sprint 162 Nov 20, 2019
@samhouts samhouts added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Nov 20, 2019
@samhouts samhouts removed this from In Progress in v4.5.0 Nov 22, 2019
@samhouts samhouts added this to In Progress in v4.4.0 Nov 22, 2019
@samhouts samhouts moved this from Ready for Review (Issues) to Done in Sprint 162 Nov 22, 2019
@samhouts samhouts moved this from In Progress to Done in v4.4.0 Nov 22, 2019
@PureWeen PureWeen closed this as completed Dec 2, 2019
@samhouts samhouts moved this from Done to In Progress in v4.4.0 Jan 3, 2020
@samhouts samhouts moved this from In Progress to Done in v4.4.0 Jan 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. community-sprint F100 in-progress This issue has an associated pull request that may resolve it! roadmap t/enhancement ➕
Projects
No open projects
Sprint 157
  
Continued in next sprint
Sprint 158
  
Ready for Review (Issues)
Sprint 159
  
Continued in next sprint
Sprint 160
  
Continued in next sprint
Sprint 161
  
Continued in next sprint
Sprint 162
  
Done
v4.4.0
  
Done
Development

No branches or pull requests

6 participants