resize images not permanent

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

resize images not permanent

Post by rinzwind » Thu Sep 03, 2015 1:26 pm

I resize copied images on a card with:

go to card "ResizedResources"
repeat with i = 1 to the number of images
put the id of image i into tid
set the width of image id tid to xwidth
set the height of image id tid to yheight
end repeat

I can see them get resized. But as soon as I switch cards, everything is back to the default size...
How to make this permanent? Is a card save really necessary?...

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: resize images not permanent

Post by rinzwind » Thu Sep 03, 2015 1:30 pm

even a save right after doesn't fix it. Switching cards... tada back to default original size.

whaaat even if I resize in the property inspector it's not permanent...

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: resize images not permanent

Post by Klaus » Thu Sep 03, 2015 1:43 pm

HI rinzwind,

you need to check "lockloc" (Lock size and prisition) in the inspector for these images
to prevent this inconvenience!


Best

Klaus

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: resize images not permanent

Post by rinzwind » Thu Sep 03, 2015 1:50 pm

wow thanks. looks better than the other weird solution I found...
set the imageData of image id tid to the imageData of image id tid

that's just crazy ;)

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: resize images not permanent

Post by rinzwind » Thu Sep 03, 2015 1:56 pm

somehow the original imagedata is still there.. I can resize it back to the original size without loss of quality. Thats not what I want. I just want permanent resize and no leftovers.

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: resize images not permanent

Post by rinzwind » Thu Sep 03, 2015 2:00 pm

the combination of lockloc and imagedata does it... ugly but it works

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: resize images not permanent

Post by Klaus » Thu Sep 03, 2015 5:05 pm

I always create my images in the necessary size in a dedicated image editing app***,
so there is no need to resize and no overhead at all!

***This will always look better than resizing an image in Livecode, althought LC is doing a good joob here
and we have the choice of three "resizequality"s here.

Post Reply