Page 1 of 2

Posted: Mon Jan 28, 2002 12:37 pm
by BackupUser
Restored from previous forum. Originally posted by cor.

I need badly loading GIF files into PB.

I must set the frames individually eg.

go to frame in a gif file

play and stop a gif file

Change the speed of a gif file.

Or has someone a DLL for this which I can Use?

Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com

Posted: Mon Jan 28, 2002 12:40 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

Better look for a DLL, because I can't implement this. GIF is copyrighted (decoder not free).

Fred - AlphaSND

Posted: Mon Jan 28, 2002 2:27 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
I need badly loading GIF files into PB.
has someone a DLL for this which I can Use?
You can download gif89.dll from here:

http://www.basicguru.com/rapidq/kb/gifanim.zip

The example that comes with the zip file is for Rapid-Q, so perhaps one of the
Rapid-Q users here could translate the example into PureBasic for us?


PB - Registered PureBasic Coder

Edited by - PB on 28 January 2002 14:28:37

Posted: Mon Jan 28, 2002 5:35 pm
by BackupUser
Restored from previous forum. Originally posted by cor.

Fred,

I think a programming language must have the standard possibility to load gif image files. I think you just have to buy the licence.

You said PB is also for gameprogramming, so at least there must be gif image possibility.



Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com

Posted: Mon Jan 28, 2002 6:18 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
I think you just have to buy the [gif] licence.
I'm sure Fred would if the price was cheap enough, but it most likely isn't.


PB - Registered PureBasic Coder

Posted: Mon Jan 28, 2002 6:19 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

First licence is very high (especially for redistruable software like a programming langage, because every users which will use PB will redistribute it) and secondly GIF is an outdated format (limited to 256 colour etc..). I plan to support the PNG in internal, like the JPEG, which boths offer better rate compression than GIF.

Fred - AlphaSND

Posted: Mon Jan 28, 2002 6:57 pm
by BackupUser
Restored from previous forum. Originally posted by cor.

Fred,

Thanks for you're explanation.

Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com

Posted: Mon Jan 28, 2002 7:27 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
I plan to support the PNG in internal, like the JPEG, which boths offer better rate compression than GIF.
Impressive

BTW: does anybody knows how to handle xpm image files with PureB



Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Mon Jan 28, 2002 8:29 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Haven't ever seen an Xpm image.

About Gif: I've read somewhere that if your program is freeware, you don't have to care about the licence, so you could use the example included with Mr. Skunk's Dll library, which works for Gif files (have just tested it).

Bye,

El_Choni

Posted: Mon Jan 28, 2002 8:53 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
Haven't ever seen an Xpm image.
A XPM image file is mostly used in the Linux/Unix world.
It is also used in the windows world but not so often.
It's fully portable because it's ascii.
Here an example of a real xpm image file:

Code: Select all

 
/* XPM */
static char *digit1[] = {
"20 20 3 1",
".        c #C0C0C0",
"         c #808080",
"+        c #0000FF",
"                    ",
" ...................",
" ...................",
" ........+++........",
" .......++++........",
" ......+++++........",
" .....++++++........",
" .....++++++........",
" ........+++........",
" ........+++........",
" ........+++........",
" ........+++........",
" ........+++........",
" ........+++........",
" ........+++........",
" .....+++++++++.....",
" .....+++++++++.....",
" .....+++++++++.....",
" ...................",
" ..................."
};

Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 28 January 2002 20:55:04

Posted: Mon Jan 28, 2002 9:55 pm
by BackupUser
Restored from previous forum. Originally posted by cor.

Do you have a working example for me?
Haven't ever seen an Xpm image.

About Gif: I've read somewhere that if your program is freeware, you don't have to care about the licence, so you could use the example included with Mr. Skunk's Dll library, which works for Gif files (have just tested it).

Bye,

El_Choni
Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com

Posted: Mon Jan 28, 2002 10:50 pm
by BackupUser
Restored from previous forum. Originally posted by DarkUni.

GIF is just a plain, all around, crappy format IMHO.

If you want animated stuff, use a multi-frame sprite.

In other words, take all the frames of the "gif" and put them side my side on a long 'image strip'.

For example - you have 100x100 gif image. It has ten frames. Make a new image 1000x100, lay each frame side by side.

In your code, use CLIPSPRITE in a loop to 'display' each frame in turn.

If interested, I'll post some source code I've done.

Shane R. Monroe
Dark Unicorn Productions

Posted: Tue Jan 29, 2002 1:50 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Franco, I'd like to code an Xpm library, it seems easy. But I would need a description of the BMP header to generate it.

Bye,

El_Choni

Posted: Tue Jan 29, 2002 3:11 pm
by BackupUser
Restored from previous forum. Originally posted by cor.

Can you please send me the example.

Cor

GIF is just a plain, all around, crappy format IMHO.

If you want animated stuff, use a multi-frame sprite.

In other words, take all the frames of the "gif" and put them side my side on a long 'image strip'.

For example - you have 100x100 gif image. It has ten frames. Make a new image 1000x100, lay each frame side by side.

In your code, use CLIPSPRITE in a loop to 'display' each frame in turn.

If interested, I'll post some source code I've done.

Shane R. Monroe
Dark Unicorn Productions
Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com

Posted: Tue Jan 29, 2002 4:07 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
Can you please send me the example.
You can post it under tips & tricks....

Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 29 January 2002 16:08:21