上のスタック02に「fld "numChars"」「fld "bwData"」「image "bwImage"」「grc "bwRect"」を追加します。左下にあるスクロール・バー「sbBar」の End Value は 「50」にしてください。「image "bwImage"」と「grc "bwRect"」は同じポジションです。
スクロールバー「sb "sbBar"」にスクリプト(コマンド)を追加します。
sb "sbBar" に追加するスクリプト
private command createBWImage
lock screen
put the imageData of image "dropImageS" into tImageSData
put "" into bwImageData
repeat with i=1 to the num of chars of tImageSData step 4
put charToNum(char i + 1 of tImageSData ) into rNum
put charToNum(char i + 2 of tImageSData ) into gNum
put charToNum(char i + 3 of tImageSData ) into bNum
put numToChar((rNum + gNum + bNum) div 3) into bwChar
put char i of tImageSData & bwChar & bwChar & bwChar after bwImageData
end repeat
set the rect of image "bwImage" to the rect of image "dropImageS"
set the imageData of image "bwImage" to bwImageData
set the rect of image "bwImage" to the rect of grc "bwRect"
put bwImageData into fld "bwData"
end createBWImage