Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,095 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,833 people online right now. Registration is fast and FREE... Join Now!




Animated GIFs crashing program?

 
Reply to this topicStart new topic

Animated GIFs crashing program?

lewax00
29 May, 2008 - 06:51 PM
Post #1

New D.I.C Head
*

Joined: 13 Jan, 2008
Posts: 24


My Contributions
I'm trying to make a simple slide show type program that displays an animated GIF image for 10 seconds, then moves on to the next one in sequence, plays that for 10 seconds...etc. and I've come across a problem I haven't seen before: animating the GIF seems to crash the program after a short time (it seems to be about the same frame every time if it matters). I've tried using ImageAnimator and just loading the image into a PictureBox and both pop up "a generic error occurred in GDI+". I then tested it by making a program with a form with a PictureBox conatining the image and got the same result. (and, more odd, when attempting to load the image the Select Resource dialog crashed at the same spot, and reloading the dialog afterwards buttons would randomly be replaced by white rectangles with red X's in them). Is there any way to stop this? (The GIF works fine in web browsers, although it stops animating at the same point in Windows Picture and Fax Viewer)

EDIT: I just thought to do another quick test, and it only seems to be that 1 image. I still need to fix it, as the image is important to the slide show.

This post has been edited by lewax00: 29 May, 2008 - 06:55 PM
User is offlineProfile CardPM
+Quote Post

ferrari12508
RE: Animated GIFs Crashing Program?
30 May, 2008 - 02:35 AM
Post #2

D.I.C Lover
Group Icon

Joined: 2 Nov, 2007
Posts: 1,112



Thanked: 2 times
Dream Kudos: 150
My Contributions
Could you dimension an array as bitmaps and then to that array, assign the images and make it like you would with sprites for a game?
User is offlineProfile CardPM
+Quote Post

lewax00
RE: Animated GIFs Crashing Program?
30 May, 2008 - 07:06 AM
Post #3

New D.I.C Head
*

Joined: 13 Jan, 2008
Posts: 24


My Contributions
That could work, I'll try it. the only issue I can see is loading 90 frames into memory quickly, although I could cycle them out and only keep the current and next one or two loaded at a time...

EDIT: It worked, and I can run it at the original resolution instead of the cropped and scaled version I made for the GIF, so thank you! But I am still curious as to why this is happening and how to fix it, but its not that important now.

This post has been edited by lewax00: 30 May, 2008 - 01:20 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 12:14AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month