-- create an image container box at the center of the current stack window with default properties create image "test" -- programtically choose the paint bucket tool choose bucket tool -- LiveCode engine has built-in color keywords: set the brushColor to "dark green" -- programtically mouse click at the center of image container box to fill click at the loc of image "test" -- get the RGBA values of the first pixel in the image box put byteToNum(byte 1 of the imageData of image "test") into tRed put byteToNum(byte 2 of the imageData of image "test") into tGreen put byteToNum(byte 3 of the imageData of image "test") into tBlue put byteToNum(byte 4 of the imageData of image "test") into tAlpha -- log message the info in the message box put "First Pixel Color is Red:"& tRed &" Green:"& tGreen &" Blue:"& tBlue &" Transparency:"& tAlpha -- just for fun replace the contents with RosettaCode logo wait 2 seconds set the filename of image "test" to "http://rosettacode.org/mw/title.png" -- the next line is copy of the Write a PPM task: export image "test" to file "~/Test.PPM" as paint -- paint format is one of PBM, PGM, or PPM