Do you know how i can BSAVE and BLOAD .JPEG and .GIF files??
I want to import filkes into my program from another file in the foler where the program is.
Also, if i wanted to draw a bvright yellow circle, which is on a red background (the yellow circle is filled in yellow) on screen 13? I tried doing graphics with the DATA command, but they never showed up on the screen even though i madew an image of a cat's head (A white cat).
Thanks,
Benjamin
bjp20003000 *AT* yahoo.ca
BSAVE and BLOAD
BSAVE and BLOAD
Have at it, guys! (I'm too busy...)
You cant BSAVE/BLOAD JPEG or GIF files. End of story.
Roughly, iirc:
DATA statements do not draw anything, you need to make a routine to actually draw stuff.
Roughly, iirc:
Code: Select all
screen 13
paint (0,0), 4
circle (160,100), 20, 14
paint (160,100), 14, 14
I have left this dump.
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
BSAVE/BLOAD: Cannot be done, just like Z!re said.Z!re wrote:You cant BSAVE/BLOAD JPEG or GIF files. End of story.
Roughly, iirc:DATA statements do not draw anything, you need to make a routine to actually draw stuff.Code: Select all
screen 13 paint (0,0), 4 circle (160,100), 20, 14 paint (160,100), 14, 14
CIRCLE: Yes, DATA statements do not draw. Try this.
Code: Select all
FOR y = 1 to MaxY
FOR x = 1 to MaxX
read Col: PSET(x, y), Col
NEXT x
NEXT y
IMPORTING: I am not sure what you mean. If you mean importing subs, then you need to compile it into a library, but that is a more advanced topic. Check the tutorial section.
If you mean linking to another file, just use the CHAIN statement. Check QBs inline help.
If you mean using varibles in a different file, then put the varibles in a file (such as this one)
Code: Select all
Ilikeeggs = 1
StopTheCommyNaziHippies$ = "By saying the cheese stands alone."
Code: Select all
'INCLUDE:'yourfilenamegoeshere.bas'
- matt2jones
- Veteran
- Posts: 80
- Joined: Sat Feb 19, 2005 8:29 am
- Location: elsewhere
- Contact:
you could use mspaint to save them as .bmp files and use freebasic to bsave/bload them however.
Or you could find a gif loader (there are loads at Qbasic.com) and bsave the screen, for futuring bloading.
ditto with the jpeg pics....
Or you could save the jpegs as .bmp and use a bmp loader (I've only found one jpeg loader before)...
You can't do it in one step, but it can be easily done with a little go-between program.
matt
Or you could find a gif loader (there are loads at Qbasic.com) and bsave the screen, for futuring bloading.
ditto with the jpeg pics....
Or you could save the jpegs as .bmp and use a bmp loader (I've only found one jpeg loader before)...
You can't do it in one step, but it can be easily done with a little go-between program.
matt
Do not mistake Apathy for feeling Content.
http://www.disjointed.cjb.net - Short Storys
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
http://www.disjointed.cjb.net - Short Storys
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
antoni: he means to load it once and then convert it into a BSAVE file.
eg (psuedo code)
And then use the bsave file...
i really need to fix this shift key.
eg (psuedo code)
Code: Select all
LoadJPEG("myfile.jpeg")
get (0, 0)-(10, 10), hi
bsave hi
i really need to fix this shift key.