waitsnake / animatedgif Goto Github PK
View Code? Open in Web Editor NEWA screensaver for Mac OSX / macOS that plays animated GIFs and APNGs
License: MIT License
A screensaver for Mac OSX / macOS that plays animated GIFs and APNGs
License: MIT License
If you run the screensaver in the background, it starts just below the menu bar, and you can see the other desktop background above it, behind the menu bar. If you have a screensaver that's the same size as the display, the bottom is cut off at the bottom.
The Metal Render not creates mipmaps so that minimised texture still look good.
I saw another bug of macOS 10.14 in the method drawInRect of NSImage. When method is used to draw into the preview window of the preferences panel of screensaver it stays black. This was working until 10.13 .
I tried a workaround with using OpenGL instead to draw into the preview window witch seems to work with 10.14 but I remember using OpenGL for the preview window with an older version of OSX leads to crashing. But I can't remember witch version it was (Mavericks or El Capitan ?). I need more tests before making an official release with OpenGL in preview window, but I will already submit the source code changes.
A GIF file can have a unique delay time for each frame, but AnimatedGif only uses the one of the first frame as static value.
Since I just start learning Japanese will be mostly a google translation witch is probably very bad.
So tagging it as enhancement is maybe a not so good idea and I should tag it as impairment. ;-)
AnimatedGif only uses a static delay time of first frame and can not handle variable delay times (see #26).
Unfortunately I saw some rare GIF files, where the first frame had no delay time at all (delay time = 0ms -> infinity fps). In some cases often the later frames include a valid delay time.
But since AnimatedGif only supports a static delay time the GIF was running way too fast.
Add support for Animated Portable Network Graphics (APNG) witch is a more modern graphics format for animated images. Since it is very similar to GIF and supported by NSBitmapImageRep(there a only small differences) it should be easy to implement.
The 3x3 tiles rendering creates a new texture for each of the 9 tiles. It would be better to create only 1 tile and map it to 9 quads.
Title says it all, there's excessive CPU usage while connected to an external display
Fans start running at full speed when the screensaver comes on. When there is no external display connected, it is fine.
GIF will look okay when viewed in sys pref. But when previewed or seen as screensaver the gif runs slow
Tried running at 30 fps with manual override setting.
Issue.mov.zip
Right now the background mode only supports the mainScreen ( https://github.com/Waitsnake/AnimatedGif/blob/master/AnimatedGif/AnimatedGifView.m#L113 ). It would be nice to support other connected screens as well.
It might be a stretch, but it would also be great to be able to pick what gif will be shown in what screen.
When low resolution pixel art images are stretched, they are rendered blurry, rather than sharp. Pixel art looks much better sharp than blurry.
A workaround is to blow the images up yourself making sure they stay sharp, but I think this may be more taxing on the computer to run.
It would be nice, if you have multiple gifs, if you could set a cycle count to how many cycles each gif goes through before loading up another random gif from the file or have the ability to change the time between cycling.
Also on multi monitor support, if there are enough gifs in the folder, have the ability to disable duplicates so no 2 screens show the same gif
Thanks for your work this thing is great! :)
How do you setup and run this?
Thanks
Even if this feature(different frame delay times in GIFs) is not used very often in most GIF files a GIF can contain different delay times between frames resulting in variable fps values during running.
For the sake of easier implementation and because the method animateOneFrame from the class ScreenSaverView did not support a changing of timerAnimateOneFrame between startAnimation and stopAnimation AnimatedGif until now did not support this feature. It uses an fixed delay time(means a fixed fps) from the first frame of the GIF for the complete animation time.
To support this feature AnimatedGif needs to trigger the needed animation steps within its own controlled timer method.
The preview I see in Settings.app looks fine, but when I activate the screensaver, the screen is black.
I've tried 1.3.6 and the 1.3.7-beta. Running 10.13.4, two external displays on a MacBook Pro in clamshell mode.
When the single file mode is active the slider for timer interval is gray, but still selectable.
On MacOS 10.14 beta 1
It crashes the desktop and screen saver menu.
I opened the project in Xcode and did some deprecation clean up now it stopped the crash but still does not load up due to constant error of missing DYLIB.
Any chance of making the gif random from a folder? Allow for a change every X amount of minutes?
I love your animatedgif screensaver. great code, it does the job.
I like to use it with http://stormandsky.com/gifs.html
But I also use
http://s.sudre.free.fr/Software/SaveHollywood/about.html
https://pastebin.com/q8Y373zK
https://flixel.com/cinemagraphs/nature/
personally, I do use SaveHollywood with cinemagraphs from flixel,
and a custom launch agent. I have more mp4s, they use less memory,
2% cpu vs 5% for a gif. BUT!
it doesn't truly seamlessly loop. gifs loop a little bit better.
It is harder to tell where they transition, sometimes even impossible because
they will rewind for truly seamless loop.
Rather than having this file run by the user from GitHub, there might be more visibility and more trust in using it from the App Store. This way, users can just uninstall via the App Store on macOS rather than additionally downloading a separate file to uninstall the screensaver.
I'm just installing AnimatedGif, and for some reason it doesn't work in my background mode. I'm not sure if it has to do with macOS High Sierra or if even a version of Xcode I'm using (8.2.1).
I'm following the instructions on the installer and I tried looking through all of the questions before asking. If anyone can help troubleshoot, that'd be awesome.
Hi, I love AnimatedGif, it works by far the best with super low cpu usage. Awesome work! If I may have a small request, I'd like to see an option for keeping the gif image's ratio but filling the screen completely with some part of the image going outside the screen area. This would make it perfect for me. Thank you!
In Preview Mode within the screensaver options and when the config panel is closed an stopAnimation event is fired by ScreenSaverFramework and then an startAnimation event.
startAnimation starts a new change timer, but the old timer was not stopped and so multiple change timer could be running. With multiple open and closing of the config panel this could lead to a very high number of running timers and very short and unpredictable change intervals of the preview form the screensaver. Once I even see [MTKView currentDrawable] crashing due to the high frequency.
This never happen in Normal or Background Mode since in those modes the stopAnimation event is only send before screensaver process closes completely and this will end also a running timer.
Add a version number of the release to preference panel and info.plist (visible version number in finder when selecting screensaver object).
First off thanks for this awesome screensaver. It would be great if we had an option to not have any time between gif changes when a directory is selected.
The preview of option "keep image original size" is not realistic since it not scales the image on the small preview window to the size how it would look like if it was on the main screen.
AnimatedGif crashes when a folder is selected that is not empty(contains other folders or files of other type than GIF), but contains no GIF files.
After AnimatedGif is restarted it continuous to crash since the folder was already saved into screensaver defaults file.
Since I'm still a beginner in Japanese I did't the most translation of Japanese GUI with help of Google. But because Japanese is such a hard language to translate this output is not always useful and needs to be fixed.
When the screensaver is installed in High Sierra 10.13 with the option "Install for this user only" it is not visible or selectable in the Systems Preference panel.
A workaround is to install the screensaver with option "Install for all users of this computer".
This is a problem or intension of implementation of the ScreenSaverEngine. When running it with parameter "-background" a second instance of a screensaver will not start(e.g. after inactivity of user or moving mouse to an active corner).
I found out that calling the screensaverenginge with parameter "-idlecheck" a second time after the background mode is already running will stop this lock and enable a second screensaver instance afterwards.
This needs to implement in AnimatedGif within the startAnimation method in case the screensaver instance starts first time.
Since implementing the workaround for #37 the About Window and Open File Dialog are behaving a bit strange. They opened in foreground but they are still missing the input focus (meaning they are no key windows).
The UI of options panel became a bit confusing with the last adding of the folder feature.
So the UI needs to be a bit more clearly represented.
I've tried to do as many tries as possible to disable and seems not to be able to.
When ScreenSaverEnginge is started by launchd with is only used for background mode than the animation becomes lagging. In any other mode, like preview window in system preferences or normal screensaver mode there is no lagging. This happens independent of the used render (same for OpenGL and Metal).
Having downloaded the Animated Gif as screensaver, I now have a "Saver Window" that is always on my screen. Have tried to get rid of it to no success. It interferes with all activities. Can you advise.
[email protected]
Background mode crashes when option "show with clock" is active too.
This issue not affects the normal screensaver mode though.
It always crashes with an "Segmentation fault 11" when ScreenSaverEngine is startet with option "-window" and "show with clock" is active too.
This is an bug of ScreenSaverEngine and even Screensavers that comes with the System are crashing under the same conditions. But since in macOS an normal user don't use the "-window" option (this feature is for developers of screensavers) this bug was hidden and not relevant.
The option "-background" that I used before did not crash with the clock active, but I needed to switch from "-background" to "-window" because of issue #28 .
Sorry this is a "wont fix" for the moment.
Since support for OpenGL will running out on macOS in the future AnimatedGif should add support for Metal as secound render API.
On older systems that don't have Metal it should still use OpenGL for drawing, but it should switch to Metal when a system has it.
The alpha blending of GIF files is not enabled globally for a hole file, but can be individually enabled or disabled for each frame.
The Metal Render at the moment enables alpha blending for a hole file. The OpenGL Render instead enables alpha blending only for each frame as it should be.
The Metal Render needs to be fixed.
There is an issue that glview is not working (stay white) after return from sleep when using background mode.
I just did a clean install on one of my machines and than I try to start AnimatedGif in background mode, but nothing happens.
I analysed it and the problem is that on a clean install of OSX the folder '/Users/name/Library/LaunchAgents' is not existing.
In the 'LaunchAgents' folder the file 'com.stino.animatedgif.plist' needs to created to start the background mode of the screensaver. But as long as the folder is missing the file will not created and background mode is not working.
Workaround is to create that folder:
1.) Open Terminal
2.) 'cd /Users/name/Library'
3.) 'mkdir LaunchAgents'
4.) Background mode is now working
The intended bugfix of AnimatedGif will be that the screensaver itself will create that folder if the folder is missing.
I saw on YT a video that shows that the wallpaper mode is not working in High Sierra.
Since I'm still on El Capitan I can't analyze the problem at the moment.
Possible reasons:
I found this forum where the discuss that the LaunchAgent in High Sierra only allows some narrow privileges of the agent file. But I'm not sure if this is really a problem since AnimatedGif don't give any strange file privileges. Anyway it needs to be checked.
See:
https://www.apfeltalk.de/community/threads/problem-mit-launchd.521676/
I read that the directory of the screensaver engine has moved! This is definitely a problem of AnimatedGif since the path is used in the launchd script that AnimatedGif creates.
macOS 10.12 and earlier: /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
macOS 10.13: /System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
See:
https://iscreensaver.com/help/notes/high_sierra/high_sierra.shtml
The command-line parameters to ScreenSaverEngine are broken in 10.13 (Submitted as RDAR 34481351). AnimatedGif can not fix the ScreenSaverEngine.
See:
https://iscreensaver.com/help/notes/high_sierra/high_sierra.shtml
https://www.reddit.com/r/techsupport/comments/7h1526/background_command_broken_macos_highsierra_10131/
Can you put preview images into your release?
Goes into
AnimatedGif.saver/Contents/Resources/en.lproj/
AnimatedGif.saver/Contents/Resources/es.lproj/
AnimatedGif.saver/Contents/Resources/de.lproj/
NAME: thumbnail.png
NAME: [email protected]
Note: Images removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.