Correcting my previous post.
You don't have to set the imageData explicitly. I was confused by vanishing
images.
Apparently if you want to set all of the imageData to numToByte(0) or
numToByte(256) the image vanishes.
The workaround is to set it to 1 or 255 respectively. This is in LC 9 GM
Ki
Hi,
please do not use numToChar in version 7.0 and up for image manipulation, use
numToByte or byteToNum
NumToChar is deprecated. It might work but is horribly slow.
along the lines of Mike's example
--
on mouseUp
local tAlphaData, tTransparent, tHalfTransparent
l
Already assuming that you know which pixel you wish to modify, (like if you
want to modify pixel 25 in pixel row 3, that would be pixel 75.. I
think..) you would need to do something like the following..
--first, put the current alphadata into a variable.
put the alphadata of img "myImg" into tAl
On Wed, May 9, 2018 7:51 pm, Richmond Mathewson via use-livecode wrote:
> The inevitable question has to be why you are doing that in such a
> fiddly sort of way.
>
> Richmond.
>
It would be too long to explain, but in short some users of a client
app will modify pixels of images that will then be
The inevitable question has to be why you are doing that in such a
fiddly sort of way.
Richmond.
On 9/5/2018 8:49 pm, jbv via use-livecode wrote:
Hi list,
Still struggling with imagedata, I am trying to modify the transparency
of an image by manipulating pixel by pixel the alpha byte.
I tried
Hi list,
Still struggling with imagedata, I am trying to modify the transparency
of an image by manipulating pixel by pixel the alpha byte.
I tried with numToChar(0) and binaryEncode("B*","") but to no
avail...
OTOH manipulating the RVB channel works fine.
Any idea on how modify the alpha