Computer Science Canada takepic Function Specifications |
Author: | andytyk [ 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. |
Author: | Mr. Glib [ Sun Nov 14, 2004 9:37 pm ] |
Post 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! ![]() ![]() Seriously, takepic works by recording the pixel values in your rectangular area that you define in the procedure. |
Author: | andytyk [ Mon Nov 15, 2004 8:29 am ] |
Post 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. |