Making a pasted image opaque
Wilhelm Sanke
sanke at hrz.uni-kassel.de
Fri Mar 2 11:29:14 CST 2007
On Thu, 01 Mar 2007, Scott Rossi and David Epstein wrote:
> Recently, David Epstein wrote:
>
> > When I use Command-control-shift-4 and drag, Mac OSX copies part of
> > the screen to the clipboard. When I put that into a MC image, the
> > "white" part of the image is transparent. Both for appearance's sake,
> > and because I want the image to receive mouseDown messages even when a
> > white area is clicked, I'd like to make the image I've pasted fully
> > "opaque". Is there a way to script this transformation?
>
> One way is create an entirely new image by importing a snapshot of the
> image
> against the white of the card. You can then delete the original image if
> you wish.
>
> Regards,
>
> Scott Rossi
One way to script this is like below:
"on mouseUp
put 0 into Counter
put the alphadata of img x into adata
repeat for each char C in adata
add 1 to counter
put numtochar(255) into char counter of adata
end repeat
set the alphadata of img x to adata
end mouseUp"
Regards,
Wilhelm Sanke
<http://www.sanke.org/MetaMedia>
More information about the metacard
mailing list