Comments (7)
- Download and install Xcode from the AppStore.
- Clone project from Github to a local folder on your computer.
-
a) Can be done on your project page by pressing the green "Clone or download" button an unzip the file.
-
b) Or type in the terminal app:
git clone https://github.com/mm12/AnimatedGif.git
- In your downloaded local project folder double click on AnimatedGif.xcodeproj to open the project in Xcode.
- In Xcode click in menu on "Product->Build For->Running" and wait until project is compiled.
- In Xcode on the left in the project tree window find the entry "AnimatedGif->Products->AniamtedGif.saver" and right click on it for context menu and in context menu click on "open in finder". A finder window should open already in the path were the compiled saver file is located.
from animatedgif.
Actually I also experimented in early versions with different change intervals also with seconds instead of minutes. But using a fraction of second instead of a minute as base of the change slider limits also the possible maximum. For example using a 15 seconds interval and having 30 different positions in the slider set the maximum value to 7.5 minutes. Using a 5 sec and you end up with 2,5 minutes as maximum.
Finally I thought that very short change intervals are mostly relevant for playing around with the software when it is new and later nobody will mind short intervals and longer intervals become more relevant. And so I ended up with values between 1 minute to 29 minutes and a special value "never".
Anyway if you do not like that decision the software is open source and you can make a fork and easily change the interval to any value you like.
I know this was done before form an other person on Github as you see here (it is based on an older version of AnimatedGif): eokuwwy@9486816
from animatedgif.
How would I implement a counter so it counts the number of times and then changes?
I just need to know if it has those variables.
from animatedgif.
The time for changing is permanently stored(even when screensaver is not running) in the ScreenSaverDefaults class and can accessed by the key @"ChangeInterval".
E.g. during startAnimation() it is loaded from this default class into the variable "changeIntervalInMin":
NSInteger changeIntervalInMin = [defaults integerForKey:@"ChangeInterval"];
The variable changeIntervalInMin is than used to start the timer:
changeTimer = [NSTimer scheduledTimerWithTimeInterval:(changeIntervalInMin * 60) target:self selector:@selector(timerMethod) userInfo:nil repeats:NO];
Those "60" is there to convert the value from minutes to seconds. The most easy way to change it would be to replace this "60" with a "1" and then the GIFs will change in a seconds and not minutes.
from animatedgif.
But if you like to count the number of times an GIF is played (or looped) you need to know when the last frame is drawn and it jumps back the frame 1 of the GIF.
This is done in timerAnimateOneFrame().
//calculate next frame of GIF to show if (currFrameCount < maxFrameCount-1) { currFrameCount++; } else { currFrameCount = FIRST_FRAME; }
The else-case where the setting of the frame counter back to FIRST_FRAME is done is a good place implement a counter how often the GIF has looped.
When you reach your desired number of change intervals (maybe loading a value from the default class like @"ChangeInterval") you can do the same steps that are done in the timerMethod().
- (void)timerMethod { // after change timer is running out this method is called // the animation of last GIF is stopped an memory cleaned, but without destroying GL view or telling the screensaver engine about it (no call of super method; handled by trigByTimer=TRUE) trigByTimer = TRUE; [self stopAnimation]; // the animation is start again witch randomly pics a new GIF from folder and start the change timer again, but without telling the screensaver engine about it (no call of super method; handled by trigByTimer=TRUE) [self startAnimation]; trigByTimer = FALSE; }
The easy way would be just call timerMethod() when you will switch to another GIF. Don't forget to comment out the start of the changeTimer mentioned in my previous post otherwise also the timer will change the GIF when he is running out.
from animatedgif.
how do i actually turn it into a .saver?
from animatedgif.
Closed because submitter try make his feature request in an own fork.
from animatedgif.
Related Issues (20)
- [MacOS 10.14] Doesn't seem to work on Mojave. HOT 6
- More ChangeInterval options? HOT 7
- [MacOS 10.15] Problems with macOS Catalina HOT 19
- Could not Load Preferences plane. HOT 4
- [MacOS 10.15] MacOS Catalina File Directory HOT 3
- Can't select a (gif) file HOT 1
- Running Mac OS Catalina: Select file or directory button not working HOT 1
- Problem with not being able to get screen saver off of my screen. HOT 1
- Animated Gif player doesn't work on MacOS Big Sur? HOT 8
- Problems with Catalina 10.15.7 HOT 2
- gif not found HOT 5
- No gif file found, please select a file or folder HOT 14
- MacOS Monterey does not support this application HOT 9
- Unable to run in background mode HOT 1
- Read This for AnimatedGif on Monterey; It works just fine.
- PPC (Power PC Macs) HOT 1
- No gif file found HOT 3
- no gif file found HOT 3
- Not working in Sonoma 14.4.1 HOT 6
- ScreenSaverDefaults not updated in Sonoma HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animatedgif.