Comments (7)
Hi,
Thanks for reporting the issue. I'll look into it as soon as I can.
from wpfanimatedgif.
Hi,
Any updates on this? I'm also having crashes because of the GDI leak.
from wpfanimatedgif.
Hi,
Sorry @LordRiffRaff for taking so long before getting back to you, and thanks @mivor for reminding me ;)
The WriteableBitmap trick does seem to keep the GDI handle count at more reasonable level. I'll publish a release with this fix shortly.
I'm wary about running a full GC every time an animation is loaded, though... it can have a pretty heavy impact on application performance, and I don't want to penalize the vast majority of users who are not affected by the problem by forcing a full GC on them.
from wpfanimatedgif.
Yeah, the GC hit can be jarring. In my use case I didn't care as it was for a kiosk, so once the app has started up you no longer care. The only problem though is that without it, it'll crash randomly. I'm not aware of a way to force the finalizer of the RenderTargetBitmap otherwise. https://stackoverflow.com/questions/13954829/gc-collect-and-finalize
Maybe an app config settings?
Then again, it may be only me and @mivor who've ended up with projects with gifs with tens of thousands of frames.
from wpfanimatedgif.
gifs with tens of thousands of frames.
Really?! 😲
OK, this might be a dumb question, but why not use a video instead? The GIF format was never intended for very long animations...
Anyway, I just released 1.4.15, which includes the WriteableBitmap fix.
from wpfanimatedgif.
Thanks for the quick fix. I will check tomorrow how it performs.
In my case the gif is definetly smaller.
I have the same gif animated in 6-10 places in one screen, for a loading animation.
from wpfanimatedgif.
Transparency, and the animation house exported them all as gifs. In the end I wrote a pixel shader to do transparent chromakey video for the large animations (i.e the ones that were 200x200 pixels).
from wpfanimatedgif.
Related Issues (20)
- Set from code HOT 2
- Huge memory consumption HOT 1
- Application freezes when resizing the window HOT 1
- Memory Leak HOT 3
- Version is 0.0.0.0 HOT 6
- Crash application when reading specific gif HOT 1
- error HOT 1
- Memory Release Problem (2) HOT 11
- When changing GIFs, the animation stops working HOT 11
- An XDG0062 error is thrown HOT 4
- Is there a way to free the BitmapImage ressources? HOT 2
- Some gif pics cannot display correctly. HOT 3
- Does not display a specific gif file HOT 3
- Not working with DrawingImage HOT 5
- File version lowered to 1.0.0 HOT 4
- Cache gif in memory so it plays instantly when shown HOT 7
- Delay animation for any gif? HOT 4
- Memory Leak HOT 3
- Pause and play with XAML HOT 1
- System.Windows.Markup.XamlParseException: Could not load 'file or assembly 'WpfAnimatedGif HOT 6
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 wpfanimatedgif.