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

Username:   Password: 
 RegisterRegister   
 Pic.New decoding
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
RaPsCaLLioN




PostPosted: Sun Feb 06, 2005 1:14 pm   Post subject: Pic.New decoding

Does anybody know how Pic.New saves an image as an integer? Example: I save a 50x50 bitmap image w/ 3 colours to a variable (using Pic.New). When I output that variable (put iObject) it puts "7003".

Can anybody decode this?
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Sun Feb 06, 2005 2:36 pm   Post subject: (No subject)

Your integer there is nothing more than a stream number. It's not a real integer (sic.)

Now, as for streams...that's a different matter.
RaPsCaLLioN




PostPosted: Mon Feb 07, 2005 12:18 am   Post subject: (No subject)

please elaborate...
Delos




PostPosted: Mon Feb 07, 2005 10:10 am   Post subject: (No subject)

Ok...try this:

code:

var pic : int
var name : string := "MyPic.bmp"

pic := Pic.FileNew (name)

put pic


On my comp, I got the int 7001. You may get something different. Now...in the editor window, click
Run -> Show Debugger Menu
Debugger -> Show Allocated Objects

Then run again. You will notice in your Allocated Objects window 4 items...the first three being OOT windows (long story behind those too...had many a bad day dealing w/ those bloody -ve numbers), and a "Picture". As you can see, its ID is quoted as 7001, and it also has a location. I might be wrong about this, but it appears that the ID gives OOT a reference of where to look to find the pic/file to store in memory.

Perhaps someone else can confirm...wtd?
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  [ 4 Posts ]
Jump to:   


Style:  
Search: