Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 WhatDotColor Image SCan.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ecliptical




PostPosted: Mon Dec 19, 2005 8:43 pm   Post subject: WhatDotColor Image SCan.

ok so i have a 230 x 140 image that I have written into a file as a long (32200 single digit number) string of one value number (either 0 or 7 (white or black)) now I would like to output the picture from that file ...

I know how to open the file etc... but how do i format the for loop?
Sponsor
Sponsor
Sponsor
sponsor
ecliptical




PostPosted: Mon Dec 19, 2005 9:15 pm   Post subject: (No subject)

figured it out by myself ...
code:
if y <= 140 then
                    y += 1


                    if y = 140 then
                        x += 1
                        y:=0
                    end if
                end if

                drawfilloval (x, y, 1, 1, col)
Cervantes




PostPosted: Mon Dec 19, 2005 9:18 pm   Post subject: (No subject)

code:

for y : 1 .. max_y
    get : fileNo, temp
    for x : 1 .. length (temp)
      Draw.Dot (x, y, temp (x))
    end for
end for


Something like that. It depends on how you've set up your file.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: