2 Replies - 2963 Views - Last Post: 30 May 2008 - 08:06 AM Rate Topic: -----

#1 lewax00  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 24
  • Joined: 13-January 08

Animated GIFs crashing program?

Posted 29 May 2008 - 07:51 PM

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 - 07:55 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Animated GIFs crashing program?

#2 ferrari12508  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3
  • View blog
  • Posts: 1,115
  • Joined: 02-November 07

Re: Animated GIFs crashing program?

Posted 30 May 2008 - 03:35 AM

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?
Was This Post Helpful? 1
  • +
  • -

#3 lewax00  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 24
  • Joined: 13-January 08

Re: Animated GIFs crashing program?

Posted 30 May 2008 - 08:06 AM

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 - 02:20 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1