create a new image from the pixels of another

Klaus Major klaus at major-k.de
Tue Jan 17 06:35:23 EST 2006


Hi Jason,

> I want to take image, that has been rotated through the 'angle'  
> command, and
> copy its contents to a brand new image.
>
> Is this possible?

Yes.

But you will have to make sure that the old and the new image have  
exactly the same dimensions!

Like this:

...
set the height of img "the new one" to the height of img "the rotated  
one"
set the width of img "the new one" to the width of img "the rotated one"

set the imagedata of img "the new one" to the imagedata of img "the  
rotated one"
## "imagedata" is the "secret" word :-)
...

But you may be disappointed, since the "free space" (if not rotated  
by 90, 180 or 270 degrees)
will be filled with black in the new image :-/

> Thanks
>
> Jason

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list