Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of the feature for playing GIFs in full-screen preview #211

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

stanmots
Copy link

@stanmots stanmots commented Feb 2, 2016

The feature for playing animated images (GIFs) in full-screen preview was implemented with the help of FLAnimatedImage high performance engine. You can find the details in the code comments.

Note: If you would like to merge this feature don't forget to run pod install to resolve the new dependency (FLAnimatedImage).

Basic usage:

You can enable/disable this feature by using a new property allowsAnimatedImages as shown in the next code sample:

CTAssetsPickerController *picker = [[CTAssetsPickerController alloc] init]; picker.allowsAnimatedImages = YES;

Result:

animatedimagesfeaturepreview

@1and2papa
Copy link
Owner

@storix Thanks for your great work! As it involve quite a lot of changes, I need time to study and validate your code before merging it to master. Hope you don't mind.

@1and2papa
Copy link
Owner

@storix I am very busy on my personal matter so I have no time to verify your improvement yet. This PR might not be merged within short period of time.

@stanmots stanmots force-pushed the play-gifs-feature branch 4 times, most recently from 26b296f to a55e011 Compare April 10, 2016 10:01
@stanmots stanmots force-pushed the play-gifs-feature branch from a55e011 to c2835ad Compare April 10, 2016 10:03
@stanmots
Copy link
Author

stanmots commented Apr 10, 2016

@chiunam It's ok. I understand.

By the way, I have made a few important changes to this feature: iOS 8 support is dropped because of the inefficiency of GIF type detection (just to know whether a current asset is GIF we must download the full-sized image data); and the entire feature is now optional with the help of CocoaPods subspec settings. So the code now is much more readable and clean.

To put it in simple words: when the users have a podfile edited like this:

platform :ios, '9.0'
pod 'CTAssetsPickerController',  '~> 3.3.0'

GIF support is disabled and all the dependencies required for this feature to work are not compiled.

To enable this feature we must add to the podfile the following line:

pod 'CTAssetsPickerController/GIF', '~> 3.3.0'

That's it. With one-line addition all GIFs will be playable. And, as you might expect, to disable GIF support this line must be deleted.

@stanmots stanmots force-pushed the play-gifs-feature branch from 5e345a2 to 8b0f10a Compare April 21, 2016 17:15
@stanmots stanmots force-pushed the play-gifs-feature branch from 8b0f10a to 078405b Compare April 21, 2016 17:16
@stanmots stanmots force-pushed the play-gifs-feature branch from 078405b to 68f6f6b Compare April 21, 2016 17:19
@stanmots
Copy link
Author

Latest changes:

  • FLAnimatedImage engine for GIF playing is replaced with the YYImage framework so that support for the additional animated image formats (such as WebP and APNG) can be enabled in the future.

@1and2papa
Copy link
Owner

Sorry, development of this project is suspended. This PR would be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants