Image rotation confusion

Jim MacConnell jmac at consensustech.com
Fri Feb 6 12:28:06 EST 2004


Listees....

I am trying to do something simple but it is giving me fits.

I have an image ³FullSize² that is 600 pixels wide by 300 tall
I have a small version ³ThumbSize² that is 100 by 50 (made by putting
³FullSize² into it and shrinking)
I referenced the ³ThumbSize² in a field using imageSource
I click on the table and put a copy of the appropriate image in a preview
image ³PhotoPreview² (about 240 x 120)


Now the fun... 
I select a folder and it loads ³Fullsize², creates ³Thumbsize², puts it in
the field and hides the originals. I click on ³ThumbSize² in the field to
select the image and it loads into ³PhotoPreview². I now want to rotate the
image by clicking on a ³Rotate² button. For each click, I want to see the
³PhotoPreview² image rotate clockwise 90 degrees. When it¹s in the right
orientation I want to set the ³Fullsize² and the ³Thumbsize² to the correct
orientation.

So what have I tried....
1. Using Rotate by ­90 screws up the image so it looks awful (right side
contains fuzz?).. And it gets worse and worse as I continue rotating... NG
2. Using ³set the angle of ³PhotoPreview² to x² makes the rotation clean but
when I try to apply the ³set angle to² to  ³Thumbsize², the image in the
field (imageSource) goes large and I can¹t get it resized.......
3. Using lockLocation to keep the image from resizing but.... Then when I
³set the angle² of it , the image is all stretched out so I have to adjust
width, etc.


Using a combination of 2 & 3, I can get close but.. .sometimes
³PhotoPreview² has garbage after I click in the field... (Related to
LockLocation being true?)
Sometimes it shows a clean image but it is large (that¹s when lockLocation
is false?) 

 So.. Bottomline. I know set angle only works on the displayed image and I
know lockLocation keeps things the same size..... . Fine but how do I get
around the resizing that is going on and actually rotate my ³ThumbSize² so
it shows correctly in the field?

I know I¹m missing something simple but have used up more than enough time
on this thing have have to move on....any hints.. Help.

Thanks,

Jim




More information about the use-livecode mailing list