Can I make an image in Paint, then have a FB program load it
Can I make an image in Paint, then have a FB program load it
Or just any image (in bitmap)?
And while I'm at it (I don't feel like making an extra post for this), what about the monthly polls?
And while I'm at it (I don't feel like making an extra post for this), what about the monthly polls?
For any grievances posted above, I blame whoever is in charge . . .
Re: Can I make an image in Paint, then have a FB program loa
[quote="Mentat"](a FB question)[/quote]
Why don't you ask FB questions here:
http://www.freebasic.net/forum/
Experts galore there.
This is a QBasic forum, not FB. (Or, if it's mission has changed, maybe future QBasic questions should go to www.qbasic.com.
Mac
Why don't you ask FB questions here:
http://www.freebasic.net/forum/
Experts galore there.
This is a QBasic forum, not FB. (Or, if it's mission has changed, maybe future QBasic questions should go to www.qbasic.com.
Mac
I don't know. I posted your question, modified to "Is there an easy way to take a BMP file such as would be created by Microsoft's Paint and display it via QBasic?" on The QBasic Forum in a thread discussing this problem.Mentat wrote:can it be done in QB?
I'm assuming, until corrected, that the answer is that there is no way for a programmer to use a bitmap image except to figure out the format of BMP files and write a zillion lines of code to convert it to QBasic image format.
TheBob, our graphics expert, has created utilities that he uses in lieu of Paint to make images pixel-by-pixel and save them in a way they can be used. It all blows my mind. I always just use scroll-mode ASCII and never use any graphics at all in any program I have ever written.
Mac
Actually, I meant a built-in function, like in BlitzBasic. I know FB has CreateImage(), but I don't think it does what I want (it creates the image during run-time, but doesn't load). I'm thinking QB might have an equivalent to ImageLoad(), but I'm not sure if there is one or what the actual function is.
If it's possible, it would be much easier to draw a sprite in paint, and then load it. I noticed that when I loade some of the QB games here, the folders already had some images ready.
If it's possible, it would be much easier to draw a sprite in paint, and then load it. I noticed that when I loade some of the QB games here, the folders already had some images ready.
For any grievances posted above, I blame whoever is in charge . . .
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
PAINT is a piece of garbage!
You will need a decent picture editing program like Paint Shop or Photoshop. You might be able to use a decent scanner photo editor. Look around for one.
The reason you need a decent editor is that QB can only use bitmaps of 4 or 8 Bits Per Pixel for images to be displayed in color. SCREEN 13 is best for pictures! 4 bit is good for SCREEN 12 and cartoons or diagrams.
Also you may need to resize the bitmap to fit the screen. SCREEN 13 also needs the height reduced to 83% of it's original size to look correct.
Qbasic can convert the image using a bitmap loading routine for the SCREEN 12 or 13 modes. You can also GET the image into an array and BSAVE it, but this is not a simple project.
Finally, if you are using sprites, they must use the same color settings or one will affect the other's. But in 13 you can use 256 colors.
I have a BSAVER at QBasicStation.com in member files.
Ted
The reason you need a decent editor is that QB can only use bitmaps of 4 or 8 Bits Per Pixel for images to be displayed in color. SCREEN 13 is best for pictures! 4 bit is good for SCREEN 12 and cartoons or diagrams.
Also you may need to resize the bitmap to fit the screen. SCREEN 13 also needs the height reduced to 83% of it's original size to look correct.
Qbasic can convert the image using a bitmap loading routine for the SCREEN 12 or 13 modes. You can also GET the image into an array and BSAVE it, but this is not a simple project.
Finally, if you are using sprites, they must use the same color settings or one will affect the other's. But in 13 you can use 256 colors.
I have a BSAVER at QBasicStation.com in member files.
Ted
-
- Veteran
- Posts: 202
- Joined: Mon Aug 30, 2004 6:18 am
- Location: Croatia
- Contact:
How about downloading http://downloads.sourceforge.net/fbc/FB ... p?download ?
Of course FB can load BMP files. And other file formats too, but you need libraries for that. Look it up.
Of course FB can load BMP files. And other file formats too, but you need libraries for that. Look it up.
Lachie Dazdarian - The Maker Of Stuff
Unlike your forum Mac does not ban anyone and only deletes posts that go over the top. FB and QBasic are discussed at network54 but as yet you do not seem to have posted.
PS
Mac did request that any discussion of FB should be in other forums , due to the flak that you were recieving, that was taking up our normally sedate replies.lol
PPS
If you think that we are being restrictive then ask Vic why he has closed the Off Topic Forum. I will tell you why, it is because Vic can not stand criticism. This is also why people like you are having to come to a QBASIC site.
PS
Mac did request that any discussion of FB should be in other forums , due to the flak that you were recieving, that was taking up our normally sedate replies.lol
PPS
If you think that we are being restrictive then ask Vic why he has closed the Off Topic Forum. I will tell you why, it is because Vic can not stand criticism. This is also why people like you are having to come to a QBASIC site.
Last edited by roy on Sun Oct 28, 2007 2:06 pm, edited 2 times in total.
Precisely. You can ask questions about, or discuss ANY programming language here -- QBasic, FreeBasic, FORTRAN or LOLcode. Any and all are welcome.Nodtveidt wrote:Mac, unlike on your forum, people ask questions for both QB and FB here, and they do it without fear of being ostracized for either compiler.
I would appreciate it if you guys would stop arguing with each other about which programming languages are allowed, and maybe try to answer each other's questions for once.
And FYI, this site specializes in both QB *and* FB. Have you looked at an issue of QB Express lately?
Pete, I hate to be pedantic but why do you call yourself Pete`s QBASIC Site if you are a general purpose in thing type site, also please change the name QB Express if it is not QB.
PS
How do you answer questions like this from a newbie if you are going to include all languages.
What is the correct way to print "Hello world"
PRINT "Hello World" or
#include <iostream>
int main()
{
std::cout << "Hello World:\n";
return 0;
}
PS
How do you answer questions like this from a newbie if you are going to include all languages.
What is the correct way to print "Hello world"
PRINT "Hello World" or
#include <iostream>
int main()
{
std::cout << "Hello World:\n";
return 0;
}
This site has been called "Pete's QBasic Site" since it launched in 1998. Freebasic didn't even exist until 2004, at which point, I started including Freebasic content on this site. I see no reason to change the long-standing name of this site that everyone has grown used to over the past nine years. Besides, 90% of the people who still use QB these days also use FB.
"QB Express" was launched in August 2004, several months before Freebasic was first released. The magazine was, and always has been, about covering the news from the QuickBasic community. When Freebasic was released, almost all the former QuickBasic coders switched to it. Same people, essentially the same language, but a newer / more exciting / more powerful platform. QB Express shifted with the community that bore it.
At one point, I considered changing the title to "FB Express," then decided not to. Who really cares what the magazine's called? More than half the content it features is about Freebasic, and the readers know that. I see no reason to change the title.
As for the forum, rod, don't be ridiculous. Obviously this site tailors to QBasic and FreeBasic. You'd have to be a fork moron to answer someone's question about printing "Hello world" in anything other than BASIC.
But if someone asks a COBOL question, for instance, I would prefer if you wouldn't flame them. Here's a general rule: Don't be a douchebag.
"QB Express" was launched in August 2004, several months before Freebasic was first released. The magazine was, and always has been, about covering the news from the QuickBasic community. When Freebasic was released, almost all the former QuickBasic coders switched to it. Same people, essentially the same language, but a newer / more exciting / more powerful platform. QB Express shifted with the community that bore it.
At one point, I considered changing the title to "FB Express," then decided not to. Who really cares what the magazine's called? More than half the content it features is about Freebasic, and the readers know that. I see no reason to change the title.
As for the forum, rod, don't be ridiculous. Obviously this site tailors to QBasic and FreeBasic. You'd have to be a fork moron to answer someone's question about printing "Hello world" in anything other than BASIC.
But if someone asks a COBOL question, for instance, I would prefer if you wouldn't flame them. Here's a general rule: Don't be a douchebag.
I find it highly incomprehensible that people from qbasic.com (y'know, all those experts and such) would not only not know one of the simplest and easiest-to-implement image formats available, but also not know that such a piece of code already exists on qbasic.com:
http://www.qbasic.com/classic/files/bmp.bas
It took less than 2 minutes to find, from beginning to end.
http://www.qbasic.com/classic/files/bmp.bas
It took less than 2 minutes to find, from beginning to end.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Not everybody uses graphics in QB and needs Bitmaps either.
I got a bitmap loader from here and the code did not even run!
It took me a while to get it working, but it is still posted here wrong.
It uses Interrupts to load SCREEN 13 bitmaps, but it still cannot load a full screen.
If anybody wants the adaptation that works, let me know. Bob Seguin is probably the best graphics programmer around and he goes to Network 54. He has some great graphics stuff!
If you prefer stealing somebody else's code off of the web, then you are not a programmer!
Ted
I got a bitmap loader from here and the code did not even run!
It took me a while to get it working, but it is still posted here wrong.
It uses Interrupts to load SCREEN 13 bitmaps, but it still cannot load a full screen.
If anybody wants the adaptation that works, let me know. Bob Seguin is probably the best graphics programmer around and he goes to Network 54. He has some great graphics stuff!
If you prefer stealing somebody else's code off of the web, then you are not a programmer!
Ted