| View previous topic :: View next topic |
| Author |
Message |
Mentat

Joined: 07 Aug 2007 Posts: 406 Location: NC, US
|
Posted: Sat Oct 27, 2007 8:52 am Post subject: 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? _________________ For any grievances posted above, I blame whoever is in charge . . . |
|
| Back to top |
|
 |
Mac
Joined: 06 Aug 2007 Posts: 151
|
Posted: Sat Oct 27, 2007 9:32 am Post subject: 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 |
|
| Back to top |
|
 |
Mentat

Joined: 07 Aug 2007 Posts: 406 Location: NC, US
|
Posted: Sat Oct 27, 2007 10:19 am Post subject: |
|
|
Okay. So can it be done in QB?
Thanks for the link.  _________________ For any grievances posted above, I blame whoever is in charge . . . |
|
| Back to top |
|
 |
Mac
Joined: 06 Aug 2007 Posts: 151
|
Posted: Sat Oct 27, 2007 12:10 pm Post subject: |
|
|
| Mentat wrote: | | can it be done in QB? |
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.
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 |
|
| Back to top |
|
 |
Mentat

Joined: 07 Aug 2007 Posts: 406 Location: NC, US
|
Posted: Sat Oct 27, 2007 12:59 pm Post subject: |
|
|
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. _________________ For any grievances posted above, I blame whoever is in charge . . . |
|
| Back to top |
|
 |
Brandon

Joined: 19 Nov 2005 Posts: 46 Location: NY
|
Posted: Sat Oct 27, 2007 3:36 pm Post subject: |
|
|
FB can load BMP images with
BLOAD FILENAME$
And QB can if you get a subrountine. I have one somewere.
Is this what you wanted? _________________ http://brandoncornell.com |
|
| Back to top |
|
 |
burger2227

Joined: 21 Aug 2006 Posts: 878 Location: Pittsburgh, PA
|
Posted: Sat Oct 27, 2007 4:46 pm Post subject: 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 |
|
| Back to top |
|
 |
Lachie Dazdarian

Joined: 30 Aug 2004 Posts: 181 Location: Croatia
|
|
| Back to top |
|
 |
Nodtveidt

Joined: 25 Jul 2004 Posts: 830 Location: Quebradillas, PR
|
Posted: Sat Oct 27, 2007 9:57 pm Post subject: |
|
|
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. _________________ NDS Uncensored
A Little de Todo |
|
| Back to top |
|
 |
roy
Joined: 29 Jul 2007 Posts: 55 Location: London
|
Posted: Sun Oct 28, 2007 12:24 pm Post subject: |
|
|
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.
Last edited by roy on Sun Oct 28, 2007 2:06 pm; edited 2 times in total |
|
| Back to top |
|
 |
Mentat

Joined: 07 Aug 2007 Posts: 406 Location: NC, US
|
Posted: Sun Oct 28, 2007 1:23 pm Post subject: |
|
|
Before this turns ugly :
What about the monthly poll? _________________ For any grievances posted above, I blame whoever is in charge . . . |
|
| Back to top |
|
 |
roy
Joined: 29 Jul 2007 Posts: 55 Location: London
|
Posted: Sun Oct 28, 2007 1:36 pm Post subject: |
|
|
LOL I vote for Kruschev.
PS
Ugly? That was mild for me. lol  |
|
| Back to top |
|
 |
Pete Site Admin

Joined: 07 Dec 2003 Posts: 868 Location: Candor, NY
|
Posted: Sun Oct 28, 2007 6:37 pm Post subject: |
|
|
| 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. |
Precisely. You can ask questions about, or discuss ANY programming language here -- QBasic, FreeBasic, FORTRAN or LOLcode. Any and all are welcome.
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? |
|
| Back to top |
|
 |
Mac
Joined: 06 Aug 2007 Posts: 151
|
Posted: Sun Oct 28, 2007 8:41 pm Post subject: Gotcha - WILCO (n/t) |
|
|
| n/t |
|
| Back to top |
|
 |
Mentat

Joined: 07 Aug 2007 Posts: 406 Location: NC, US
|
Posted: Sun Oct 28, 2007 8:57 pm Post subject: |
|
|
Ah Mac, don't worry. My main question was answered. _________________ For any grievances posted above, I blame whoever is in charge . . . |
|
| Back to top |
|
 |
roy
Joined: 29 Jul 2007 Posts: 55 Location: London
|
Posted: Mon Oct 29, 2007 10:35 am Post subject: |
|
|
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;
} |
|
| Back to top |
|
 |
Mentat

Joined: 07 Aug 2007 Posts: 406 Location: NC, US
|
Posted: Mon Oct 29, 2007 4:11 pm Post subject: |
|
|
Because "Pete's QB site" stands for:
Pete's Quick free BASIC Site
Cheer up. After all, QB and FB are, as of now at least, hobby languages. _________________ For any grievances posted above, I blame whoever is in charge . . . |
|
| Back to top |
|
 |
Pete Site Admin

Joined: 07 Dec 2003 Posts: 868 Location: Candor, NY
|
Posted: Mon Oct 29, 2007 4:21 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Nodtveidt

Joined: 25 Jul 2004 Posts: 830 Location: Quebradillas, PR
|
Posted: Thu Nov 01, 2007 9:08 pm Post subject: |
|
|
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. _________________ NDS Uncensored
A Little de Todo |
|
| Back to top |
|
 |
burger2227

Joined: 21 Aug 2006 Posts: 878 Location: Pittsburgh, PA
|
Posted: Fri Nov 02, 2007 12:19 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|