Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Bitmap/LiveCode/bitmap.livecode
Normal file
20
Task/Bitmap/LiveCode/bitmap.livecode
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue