Graphics Help Please!!!

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
J-Man

Graphics Help Please!!!

Post by J-Man »

Hello, i'm pretty new to qbasic, any way, i'm trying to insert a graphic i made in pixel plus into a program i made. i'm using DATA to do it but everytime i run the program i get the error: OUT OF DATA. i am using the whole array thing. Could anyone please tell me what i am doing wrong, and or suggest a different way to do it. Here is the code i am using to insert the picture:
SCREEN 13
RESTORE pic
FOR py = 0 TO 100
FOR px = 0 TO 100
READ a
PSET (px, py), a
NEXT px
NEXT py
END
pic:
DATA 5002.....

Thankyou for any help...
Deleter_

Post by Deleter_ »

Well, I'd assume you are trying to read more data than you have. note: 0-100 is 101 wide, not 100 wide, this might be the source of your problem.
User avatar
Kyle
Veteran
Posts: 107
Joined: Thu Apr 14, 2005 2:41 pm

Post by Kyle »

Yes, I'm guessing that is the problem too. If you change the 0 TO 100's to 1 TO 100, you should be fine.
J-Man

THANK YOU TO THE MAX

Post by J-Man »

thanx 4 your help
J-Man

It sort of worked

Post by J-Man »

your idea sort of worked, the imiage flashed up for a second, only some of it though. then the program ended and i got the same error : OUT OF DATA. Any other suggestions
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Show us the entire data source.

You're most likely doing it wrong...


Are you having 100*100 data entries?
Thats 10'000..
I have left this dump.
J-Man

Here it is

Post by J-Man »

SCREEN 13
RESTORE pic
FOR py = 0 TO 100
FOR px = 0 TO 100
READ a
PSET (px, py), a
NEXT px
NEXT py
END
pic:
DATA 5002, 800,100,11264,10280,10280,10280,11304,0,0,0,0,0,11264,0,44,0,0,0,0,0
DATA 0,0,257,0,257,257,0,256,1,256,1,257,257,256,1,257,256,257,257,256
DATA 1,256,1,257,257,1,256,257,1,256,257,1,10284,10280,11308,10284,10280,44,0,17408
DATA 0,0,11308,0,11052,0,0,43,0,0,0,256,3841,15,3841,3855,271,256,15,256
DATA 15,3841,3855,256,271,3841,256,3855,3855,256,15,256,15,3841,3855,271,256,3855,15,257
DATA 3855,3855,10284,11304,0,11264,10280,11304,0,17408,11308,11264,11308,11051,11052,44,11308,43,0,0
DATA 0,257,271,15,3841,0,3841,256,15,257,15,3841,0,256,3855,3841,0,3841,0,256
DATA 15,256,15,3841,0,3841,256,15,0,3841,0,0,10280,44,0,0,10284,11304,0,17408
DATA 11332,11308,11308,11308,11052,11052,11052,43,0,0,0,3841,256,15,3841,0,3841,256,271,3841
DATA 0,3841,3855,256,271,3855,0,3841,0,256,15,256,15,3841,257,3841,256,3855,15,257
DATA 3855,1,10280,44,0,0,10284,11304,0,0,3652,11332,11308,11052,11052,11051,11052,0,0,0
DATA 256,3841,257,15,3841,0,3841,256,271,15,0,3841,0,256,15,3841,0,3841,0,256
DATA 15,257,15,3841,3855,15,256,15,0,0,256,3855,11304,44,0,0,10284,10280,44,0
DATA 17476,11332,11308,11308,11051,11307,11052,0,0,0,257,15,271,15,3841,257,3855,256,3855,0
DATA 0,3841,257,256,15,3841,0,3841,0,256,271,3841,0,3841,256,15,256,271,1,257
DATA 257,3841,11304,0,0,0,11264,10280,44,0,17476,11308,11308,11307,11052,11307,11051,0,0,0
DATA 3841,0,256,15,3841,3855,0,256,15,0,0,3841,3855,256,15,3841,0,3841,0,0
DATA 3841,15,0,3841,0,3841,256,3855,15,3841,3855,15,11304,0,0,0,11264,10280,44,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,11304,0,0,0,11264,10280,44,11264,0,11264,0,0,11308,44,0,0,11264,11308
DATA 0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,6400,0,0,0,0,0,0,0,11304,0,0,0,11264,10280,44,10284
DATA 44,10284,44,11264,10280,11304,0,11264,10280,10280,44,11264,11304,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,6422,27,0,0,0,0
DATA 0,0,11304,0,0,0,11264,10280,44,10284,44,10284,44,10284,11304,10280,44,10284,11304,11308
DATA 0,11264,11304,0,0,7424,7453,7453,7453,7453,7453,7453,7453,7453,7453,7453,7453,7453,7453,7453
DATA 7453,7453,7453,7453,6422,1563,6,1542,1536,6,6,0,11304,0,11264,44,11264,10280,44,10284
DATA 44,10284,44,10284,44,10240,44,10284,44,0,0,10284,10280,44,7424,6941,6683,6682,6682,6938
DATA 6939,6939,6939,6939,6939,6939,6939,6939,6939,6939,6939,6939,6939,6939,6422,1563,29226,1542,1650,29190
DATA 1542,6,11304,0,10284,11304,11264,10280,44,10284,44,10284,44,10284,11308,10284,44,10284,44,0
DATA 11264,10280,10280,3624,6941,6939,6939,6939,6682,6682,6682,6682,6939,6939,6939,6939,6939,6683,6682,6682
DATA 6682,6682,6682,6682,6422,1563,29190,1542,10866,29190,10758,42,11304,44,10284,10280,10284,10280,44,10284
DATA 44,10284,44,10284,10280,10280,44,11264,10280,44,0,11308,11304,44,5888,5911,6168,6168,6168,6168
DATA 6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6422,1563,29190,1578,1650,29190
DATA 1542,6,11304,44,11264,10280,10280,11304,0,10284,44,10284,44,10284,11308,11308,0,0,10284,11304
DATA 0,11264,11304,0,0,5910,6167,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168,6168
DATA 6168,6168,6168,6168,6422,1563,29190,1542,1650,29190,1542,6,10280,44,0,10284,10280,11308,0,10284
DATA 44,10284,44,10284,44,0,0,0,11264,10280,44,11264,11304,0,0,0,5654,5654,5654,5654
DATA 5654,5654,5654,5654,5654,5654,5654,5654,5654,5654,5654,5654,5654,5654,6422,1563,6,1542,1536,6
DATA 6,0,10280,11304,0,11264,10280,11304,0,10284,44,10284,44,10284,44,0,0,0,0,10284
DATA 44,11264,11304,0,0,0,0,0,12288,0,0,0,48,0,0,0,0,0,0,512
DATA 0,0,0,0,6422,27,0,0,0,0,0,0,10284,10280,11308,10284,10280,10280,44,10284
DATA 11304,10280,44,10284,11304,11308,0,11264,11308,10280,44,11264,11304,0,0,0,0,0,0,12336
DATA 0,512,12336,512,0,0,12288,512,2,560,12288,2,0,0,6400,0,0,0,0,0
DATA 0,0,11264,10280,10280,10280,11304,10280,11304,11264,10280,11304,0,11264,10280,10280,44,10284,10280,11304
DATA 0,11264,11304,0,0,0,0,0,0,12290,560,512,12336,12290,2,0,12290,12290,512,12336
DATA 560,0,0,0,0,0,0,0,0,0,0,0,0,10284,10280,10280,44,10284,11304,0
DATA 10284,44,0,0,11308,11308,0,11264,11308,44,0,0,44,0,0,0,0,0,0,512
DATA 12336,514,560,12336,2,0,12290,560,2,12290,2,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0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

ok, theres your problem :) you only have 523 data elements. you need 1000. thats why your out of data.
Deleter_

Post by Deleter_ »

^ i mean you need 10 000 and you have 5023
j-man

ok

Post by j-man »

thanks i think my program must be having some sort of output difficulties
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Actually, 10 000 data elements, containing SINGLE data, means:
10'000*4 = 40'000bytes

Which is usually more than QB can handle.


If it's not QB, then add the missing DATA statements.
I have left this dump.
Deleter_

Post by Deleter_ »

i think those are just colors, not single data. so he probably needs 10 000 not 5 000
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Default data type is set to SINGLE..

A SINGLE type takes 4 bytes.
I have left this dump.
User avatar
Deleter
Veteran
Posts: 119
Joined: Sat May 07, 2005 7:31 pm

Post by Deleter »

one color per one pixel (a color can be represented by a single number) = 100 * 100, i dont see what a single has to do with it.
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Your realize these DATA statments also have values like : 6321, 1000,... and your reading them into "a" which is then placed after PSET for color... color values normaly range just a lil past 256.. 256 being the limit, all else after that is white....

The Usersub.bas with PP256 tells you how to render that info... as far as I remember, it has something to do with palette changes of some sort.... :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Deleter
Veteran
Posts: 119
Joined: Sat May 07, 2005 7:31 pm

Post by Deleter »

yeah, i was wondering about that, where exactly are you getting those values from?
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

It's pixel index values, stored in pairs of 2 (INTEGER)

He's reading them into a SINGLE variable type, a

He's trying to pset them.


There are ~10'000 entries, he's just reading two at a time.

Code: Select all

for py = 0 to 100
 for px = 0 to 100 step 2
  READ a
  c1 = a mod 256
  c2 = int(a \ 256)
  pset (px, py), c1
  pset (px+1, py), c2
 next
next
end
I have left this dump.
User avatar
Deleter
Veteran
Posts: 119
Joined: Sat May 07, 2005 7:31 pm

Post by Deleter »

makes sense. i was wondering if that was what it was. :)
Post Reply