Image rotation confusion

Scott Rossi scott at tactilemedia.com
Fri Feb 6 13:36:13 EST 2004


Recently, "Jim MacConnell"  wrote:

> 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.

An interesting graphics problem.  I can't recall if there's any way to get a
reduced image into another image other than a screen capture (snapshot).
It's probably not optimal, but you might be able to find some way to use the
example posted below.  Type the following in your message box:

 go url "http://www.tactilemedia.com/download/imgRotate.rev"

This relies on being able to capture the screen, so you cannot hide the
reduced fullsize image, and I'm pretty sure you can't position the fullsize
image offscreen or the capture will fail (try some tests to be sure).

Without knowing your situation, I'd guess one way to do what you want might
be to build a set of thumbnails at startup, and rotate (set the angle) of
those only.  Then apply your rotation to fullsize image/s afterward.

Someone else might be able to offer another suggestion.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list