Rev Graphics Gurus

Wilhelm Sanke sanke at hrz.uni-kassel.de
Tue Oct 17 17:21:56 EDT 2006


On Tue Oct 17, John Vokey vokey at uleth.ca

> Rev Graphics Gurus,
> I have two general questions (which ultimately will evolve into many  
> more).  I need to manipulate the contents of images in Rev in two ways:
>
> 1) I need to average, pixel by pixel, two images (of the same size)  
> before display of that average.  So, the question is: how do I access  
> the individual pixels of the two images?  Do I load them as binary,  
> and then locate the pixels (somehow) within the binary objects?  Load  
> them as images, and then (somehow) access Rev's internal representation?
>
> (snip)
>
> -JRV


A look at my "Imagedata Toolkit" could be interesting for you. Apart 
from more than 200 filter variants for images one of the basic settings 
of the toolkit are two superimposed images that can be combined in 
various ways. Here is a script for a 50-to-50 superimposing of images of 
the same size:

"on mouseUp
    put the imageData of image 2 into iData2
  put the imageData of image 1 into iData1
  put 0 into counter
  repeat for each char C in idata2
    add 1 to counter
    put chartonum(C)  into tC2
    put chartonum(char counter of idata1) into tC1
    put trunc((tc1 + tc2)/2) into tc
    put numtochar(tC) into char counter of idata2
  end repeat
  set the imageData of image 2 to iData2
end mouseUp"

You can download the "Imagedata Toolkit" from page "Sample Stacks" of my 
website <http://www.sanke.org/MetaMedia> where you also find a short 
description of the stack and some other stacks for manipulating imagedata.

Regards,

Wilhelm Sanke
<http://www.sanke.org/MetaMedia>





More information about the use-livecode mailing list