Page 1 of 1

problem with combination of set angle and rescale

Posted: Fri Jun 10, 2011 9:32 am
by Tomka
Hi there,

I got a strange problem with the combination of set an angle and changing heigth/width of an image. Its no problem to change the angle - works very fine. Its also no problem to change the imagesize (set heigth/width) - works also fine. I do this using 2 different scrollbars :)

BUT when the user first resized the picture (e.g. makes it smaler) and then rotates it - the image will be shown in its original size but the imagefield itself still got the resized proportions. So the imagecontent doesnt fit in the imagefield anymore -> means: proportions of the imagecontent > proportions of the imagefield.

Sry, cant explain it in a better way.

Anyone knows that problem and a way to solve it?

Thanx alot for your help...

Best
Thomas

Re: problem with combination of set angle and rescale

Posted: Fri Jun 10, 2011 12:05 pm
by Klaus
Hi Thomas,

the sad truth is you cannot have both!
Image manipulation capabilities of LiveCode are, well, just LOUSY! :D

When you set the "lockloc" of the image to true, it will get distorted whan "angling".
And when you NOT "lockloc" the image it will resize to its original dimension AFTER
you resizued it and then set its angle.

The only advice I can give, try to change your app design to either let the user resize OR "angle" it.
Maybe you can create a snapshot of the user resized image and then use that for "angling"?

Sorry for the bad news, don't shoot the messenger, thanks 8)


Best

Klaus

Re: problem with combination of set angle and rescale

Posted: Fri Jun 10, 2011 1:24 pm
by BvG
another workaround would be to set the size of your image, then set an empty image that has the same (resized) size to the imagedata of the first image. now you can rotate the second image, because it does only have that one size, and is not actually resized, so to say.

Re: problem with combination of set angle and rescale

Posted: Fri Jun 10, 2011 1:58 pm
by Tomka
ok, let me see if I understand...

the problem seems to be that if I change the angle... the proportions of the imagedata will be set to its original values.

i dont understand your solution BvG :) ...

Let me explain my "project" a bit. I got 2 image of persons which have to be rotatable and resizeable (both is nessesary!).

Cause there are only 9 possible sizes (and I only use 2 different images) its maybe the best solution to make for each size a single img.file which would be loaded if the user changes the size. Would be only ( :shock: ) 16 more files :D ...

Whats your opinion about that?

Re: problem with combination of set angle and rescale

Posted: Fri Jun 10, 2011 2:38 pm
by Klaus
Hi Thomas,

yes, that seems to be the best solution.
Remember that you can generate the necessary sizes "on the fly" in Livecode"!

I would eventually use a button and change its icon on the fly accordingly.
This way you could keep all image files invisible.
Just a quick thought :D


Best

Klaus

Re: problem with combination of set angle and rescale

Posted: Sun Jun 12, 2011 5:45 am
by Tomka
Hi,

only want to say that the solution with the seperate img-files works fine. My project is nearly finished now :)

Thx alot Klaus :)


Best
Thomas