Alpha Channel?

Michael J. Lew michaell at unimelb.edu.au
Thu Jun 10 20:28:36 EDT 2004


You CAN permanently re-size an image with only a little bit of indirection.

Make the image the size you want, then make a new image and type 
these two lines in the message box:

set the rect of image 2 to the rect of image 1
set the imageData of image 2 to the imageData of image 1

Now image 2 has its "natural" size set to its current size. Go to 
another card in the stack and return and you will find image 1 has 
reverted to its inital size but image 2 has stayed just how you want 
it.

(It works because the imageData is the pixels as displayed, not the 
pixels at the original image size.)

Hope that helps.

Graham wrote:
>It drives me crazy too because it's not clear how you turn off the 'revert
>to original' feature permanently, for example if you want to repurpose the
>image entirely and completely lose the original size. I mean, if I'd
>altered the shape of an image in a graphics package, I wouldn't expect the
>'original size' to haunt me forever, would I? I don't see an original size
>as a 'natural' size; it's just what I started with, neither more nor less.

-- 
Michael J. Lew

Senior Lecturer
Department of Pharmacology
The University of Melbourne
Parkville 3010
Victoria
Australia

Phone +613 8344 8304

**
New email address: michaell at unimelb.edu.au
**


More information about the use-livecode mailing list