New comer says hi and starts asking =D

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
lurah-
Veteran
Posts: 206
Joined: Mon Nov 01, 2004 10:47 am
Location: Finland
Contact:

New comer says hi and starts asking =D

Post by lurah- »

After some years with out qb i got my interest back.

I know how to load bmp picture on screen (320*200, 256 colors).
But how i can load an 100*100 area from 640*400 bmp picture?

I could first load whole picture and then read wanted area from it, bsave it and so on but is there any stright way to load only that area i want from that picture?
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

The best way to go about that would be the "hard" way, which would be to read the data inside the BMP file itself and only displaying the pixels in the range you want. Say like...you could loop through the image data and only draw the pixels which fell into a certain range of X/Y coordinates. It's sorta hard for me to explain such things but...do you get the idea at least? :D
User avatar
lurah-
Veteran
Posts: 206
Joined: Mon Nov 01, 2004 10:47 am
Location: Finland
Contact:

Post by lurah- »

Yah, i see your point and i freid that it?s the only way.
Sounds darn "hard" and slow. I tested to do that kind of thing but couldnt get it work anyway :lol:
Post Reply