Setting Pixels - Clarification

Ken Ray kray at sonsothunder.com
Tue Jan 28 22:19:01 EST 2003


Robert,

This is something that as you identified is too slow to be done in regular
Transcript. You need the help of an external to do the processing of the
imageData for you. You might want to check out Chipp Walters' image tools
at:

http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm

There's image compositing and convolution matrix utilities there that use an
external for speed.

I hope it works for you,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Robert J Warren (Howsoft.com)" <warren at howsoft.com>
To: <use-revolution at lists.runrev.com>
Sent: Tuesday, January 28, 2003 8:24 PM
Subject: Setting Pixels - Clarification


> Many thanks to Scott Rossi for the tip, which as a Rev beginner I am
> grateful for. However, I overdid it a little in trying to state my
objective
> simply. So I'll repeat the relevant part of my problem and try to explain
my
> aim more carefully.
>
> As I gather from Ken Ray's very useful article "Understanding ImageData,
> MaskData and AlphaData", "...you don't set SPECIFIC PARTS of imageData...,
> you set  these properties as a whole."
>
> >From the examples, this seems to mean in practice that if I want to
change a
> single pixel in an image I need to read the whole image bitmap into a
> variable, change the pixel in the variable, and then copy the whole
variable
> contents back into the image.
>
> Surely not! This is an incredibly slow process. Can anyone tell me of a
> workaround? Or if there is no solution in RunRev #1, will this be fixed in
> #2?
>
> What eventually I would like to do is something like this (but this is
only
> any example). Suppose I am moving the mouse pointer in the form of an
eraser
> (i.e. a square of certain dimensions) over a photo. Wherever the eraser
> passes, the colours change to a given different hue. So what I need is to
be
> able to extract the pixels under the eraser, convert them to HSL, adjust
the
> hue, convert them back to RGB, and then replace the pixels in the photo in
> the required position under the eraser.
>
> Using a bitmap pointer technique I manage to achieve this at appropriate
> speed in VB by accessing the image bitmap directly, without having to copy
> the whole image into a variable which would slow down the process too
much.
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>




More information about the use-livecode mailing list