I had to laugh out load! Hope you will too.
In an effort to reduce processing time I decided to test whether logic like this:
Code: Select all
put byteToNum(byte (byteNumber+3) of imagePixels) into greenValue
repeat until length(greenValue) = 3
put "0" before greenValue
end repeat
would run faster than
Code: Select all
put byteToNum(byte (byteNumber+3) of imagePixels) into greenValue
if greenValue < 100 then
repeat until length(greenValue) = 3
put "0" before greenValue
end repeat
end if
The goal is to format each byte to three-character values; so only bytes with values of 99 or less out of a max value of 255 need rendering.
Remember, similar logic is applied to each any every byte in the imageData, alphaData, & maskData; so some small edge in timing applied over something just short of 1.2 billion bytes in this instance could make a difference. So I modified the logic in my test stack, recorded the ticks, added timing logic to the script in my primary development stack, and ran it there.
Turns out the difference in timing was not significant; but low and behold, when I hit "Hide Output", the dataGrid was gone in a flash.
It took me a few minutes of anguish,...wondering what had happened. Then I remembered I had changed my primary stack to delay emptying the dataGrid until closeStack.
The laugh is on me.