Images

Chipp Walters chipp at chipp.com
Fri Jan 27 21:54:31 EST 2006


Couple of things.

1) you can set the resizeQuality of the image to best so that it will do 
a nice interpolation of the image as it gets smaller. Takes a small 
amount of more time, but IMO it's worth it.

2) You should store as custom props the original width and height of the 
image, then set the image to that size BEFORE putting the imageData into 
it. The imageData doesn't know what size the image is and that's why 
you're getting garbage.

If you just want to keep the smaller image, then do something like this 
after resizing it:

get the width of img "myImage"
set the uWidth of this card to it
get the height  of img "myImage"
set the uHeight of this card to it
get the imageData of img "myImage"
set the uImgData of img "myImage" to it

Now,

on preOpenStack
   set the width of image "myImage" to the uWidth of this card
   set the height of img "myImage" to the uHeight of this card
   set the imageData of img "myImage" to the uImgData of this card
end preOpenStack

That should work for you.

best,

Chipp





More information about the use-livecode mailing list