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

Username:   Password: 
 RegisterRegister   
 Pixel Graphics Help Needed
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Rutilus




PostPosted: Mon Feb 14, 2005 11:14 pm   Post subject: Pixel Graphics Help Needed

I am currently in grade 11 computer science and we are working on pixel graphics. I need to save an image that takes up the left half of the screen to a file but I'm having some trouble. Here is my code:

code:

var picture : int
var file : int

picture := Pic.New (1, 1, 640, 480)

open : file, "picture", write

put : file, picture / 2


It says "Put attempt incompatible on stream number 1"

Please help, I have something due next week!

-AS
Sponsor
Sponsor
Sponsor
sponsor
Bacchus




PostPosted: Tue Feb 15, 2005 7:46 am   Post subject: (No subject)

you cant really divid the picID by 2 to get half of the picture. the picID is just a reference to the picture for turing. to make half the pic do
var picID:int:=Pic.New(0,0,maxx div 2,maxy)
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  [ 2 Posts ]
Jump to:   


Style:  
Search: