imagedata and alpha byte
bonnmike at gmail.com
Wed May 9 14:29:06 EDT 2018
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 tAlpha
-- then modify the alphadata for the pixel in question
put numtochar(0) into char 75 of tAlpha -- 0 is transparent, 255 is
-- change all necessary pixels here then
-- set the image to the new alphadata
set the alphadata of img "myImg" to tAlpha
On Wed, May 9, 2018 at 11:59 AM, jbv via use-livecode <
use-livecode at lists.runrev.com> wrote:
> 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 exported as PNG to
> a server and then displayed in a website.
> I have successfully modified the alpha channel of images with php for
> years, and am just wondering why this doesn't work in LC...
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode