Loading Image Info and determin .GIF file type

Just starting out? Need help? Post your questions and find answers here.
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Loading Image Info and determin .GIF file type

Post by Pantcho!! »

Hello.

i have this program which scans a directory for image files.
if i have more then 90 images the scanning takes sooooooooooo much time

especially when i need to check if the image is a reguler Gif image or Animated gif with the Movie() functions.

is there a fast way to scan imagesto receive resolution info + to know if a GIF is animated .... ?
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Anyone? :?
KameHameHaaa
User
User
Posts: 19
Joined: Wed Oct 05, 2005 2:44 pm

Post by KameHameHaaa »

After checking the gif file structure, I've seen that the number of frames aren't stored somewhere. It's just a stream of frames, so you have to parse all the file until you reach the end...
Not sure will be faster than the Movie() command.
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Thank you for checking it i apperciate it alot!

if anyone got any other soltion , i am still waiting for your replys.

thank you.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

There's no other solution AFAIK. It's like KameHameHaaa said,
the number of frames isn't stored inside the file.

Did you look at the file format descriptions for GIF89a on wotsit.org
or google?
Good programmers don't comment their code. It was hard to write, should be hard to read.
Post Reply