Page 1 of 1

Graphics Help Please!!!

Posted: Wed May 11, 2005 11:10 pm
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...

Posted: Thu May 12, 2005 8:41 am
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.

Posted: Thu May 12, 2005 11:21 am
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.

THANK YOU TO THE MAX

Posted: Thu May 12, 2005 8:29 pm
by J-Man
thanx 4 your help

It sort of worked

Posted: Thu May 12, 2005 8:37 pm
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

Posted: Thu May 12, 2005 9:18 pm
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..

Here it is

Posted: Thu May 12, 2005 11:22 pm
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,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,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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,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

Posted: Fri May 13, 2005 9:49 am
by Guest
ok, theres your problem :) you only have 523 data elements. you need 1000. thats why your out of data.

Posted: Fri May 13, 2005 9:50 am
by Deleter_
^ i mean you need 10 000 and you have 5023

ok

Posted: Sun May 15, 2005 7:28 pm
by j-man
thanks i think my program must be having some sort of output difficulties

Posted: Mon May 16, 2005 4:23 am
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.

Posted: Mon May 16, 2005 9:00 am
by Deleter_
i think those are just colors, not single data. so he probably needs 10 000 not 5 000

Posted: Mon May 16, 2005 9:33 am
by Z!re
Default data type is set to SINGLE..

A SINGLE type takes 4 bytes.

Posted: Mon May 16, 2005 2:12 pm
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.

Posted: Mon May 16, 2005 7:06 pm
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:

Posted: Mon May 16, 2005 9:11 pm
by Deleter
yeah, i was wondering about that, where exactly are you getting those values from?

Posted: Tue May 17, 2005 3:31 am
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

Posted: Tue May 17, 2005 2:14 pm
by Deleter
makes sense. i was wondering if that was what it was. :)