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

Username:   Password: 
 RegisterRegister   
 takepic Function Specifications
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
andytyk




PostPosted: Sun Nov 14, 2004 9:20 pm   Post subject: takepic Function Specifications

Can someone possibly tell me how the pixel data is stored in the integer array when you use the takepic function?

Any information would be appreicated.
Sponsor
Sponsor
Sponsor
sponsor
Mr. Glib




PostPosted: Sun Nov 14, 2004 9:37 pm   Post subject: (No subject)

Well, Turing first takes your picture and then squishes it so that it is really small and then chops it up into equal slices to fit in the integer arrray! Wink Very Happy

Seriously, takepic works by recording the pixel values in your rectangular area that you define in the procedure.
andytyk




PostPosted: Mon Nov 15, 2004 8:29 am   Post subject: (No subject)

I know what it does, and I've taken a look at the integer values...

For example, the first 18 (or was it 22, haven't worked on it in a while) values store the data describing the picture and that the pixel data does not start until afterwards.

The pixel data is stored with the colour's r, g, b component each being multiplied by 256 and stored as r * 2^16 + g * 2 ^ 8 + b.

In the header there is also data stored about the image size....

But that's all I know about it for now, I want to be able to master the format so I can say.... take an image, and create slices of it and being able to manipulate them without drawing it on the screen.
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: