Qbasicnews.com

Full Version: .gif file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do load two gif files (320x200) side by side
I want to be able to load in a gif file


also has anybody got a sub to centre text on a screen
This thing I made seems to work for small strings.
Code:
DECLARE SUB CenterText (AS STRING,AS INTEGER,AS INTEGER)
SUB CenterText (Text AS STRING,ScrWidth AS INTEGER,Row AS INTEGER)
    DIM AS INTEGER Col
    Col=ScrWidth/2-LEN(Text)/2
    LOCATE Row,Col
    PRINT Text
END SUB
ScrWidth is the number of characters that fit into a horizontal line (I think 80 for console mode), and row is the row to print Text on.
does it have to be a gif file? gif is plagued by patent problems, and also it would be easier to load from a bmp or similar.
How about a png i want a lot of pics to be loaded in the program so they need to be compressed
PNG is definitely the best. It carries no royalty requirement, it's lossless, it's an open standard, it supports alpha channels and it supports variable colour depths. It's the perfect image format.
http://www.freebasic.net/forum/viewtopic...hlight=png

Theres some code here for loading a PNG using the FreeImage Library. FreeImage is quite a large dll though.
You guys are behind the times. The GIF patent expired in 2003 in the US (and 2004 in other countries). Unisys won't be going after anybody over LZW anymore. It's still a nice file format, and it's well supported around the internet, I use it on websites all the time (I often get better compression than PNG on simple files).

I've been thinking about porting the giflib headers and making some binaries. I guess I'll do that now.
So, are GIF's able to be used on FB? What about animated, interlaced, or other types?
There are no routines in the FB graphics library for manipulating .gif files, but the file format definition isn't difficult to find, and there may be other libraries available.
Ok, I translated giflib:

http://www.betterwebber.com/stuff/giflib.zip

Which is the main oss used for gif encoding/decoding. Has the capacity for extensions/animations/whatnot, and an example's included to boot.
Pages: 1 2