create a new image from the pixels of another
    Jason (Polydiam) 
    jason at polydiam.com
       
    Tue Jan 17 07:20:02 EST 2006
    
    
  
Hi, Thank you for that,
One last thing, how do you create the empty image "the new one" through code
when it is needed?
 
Thank you
 
 
>>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
 
 
 
>>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?
 
>>Thanks
 
>>Jason
    
    
More information about the use-livecode
mailing list