Need a little help with image resizing

Michael Kristensen michael-kristensen at dsa-net.dk
Sat Aug 11 12:52:13 EDT 2018


Hi there

I have an image B1 with a scribble made with brush tool in it.
I want to double the width of the image without distorting the scribble. 

The plan is to: 
1. select the image with select tool
2. cut the image out
3. resize the image
4. paste the image back in, in the original proportions

As script:

on mouseUp
   lock screen
   
   put (item 1 to 2 of rect of img B1) into K1
   put (item 3 to 4 of rect of img B1) into K2
   
   choose select tool
 
   drag from K1 to K2
  
   cut
 
   set width of img B1 to 2*(width of img B1)
  
   drag from K1 to K2
  
   paste
   
   choose browse tool
end mouseUp


But the script does not work. The proportions of the image after paste is as if the image was stretched.


NOTE 
This works if I cut from one image and paste into another.

It also works if I do it manually on image B1.


Thanks 

Mic


More information about the use-livecode mailing list