Help with image effect
Scott Rossi
scott at tactilemedia.com
Sun Oct 23 16:27:40 EDT 2005
Recently, Alex Tweedly wrote:
> I want a nice, simple (?) visual effect:
>
> I have two images (which may be different sizes), and I want to swap
> them over (such that each one stretches or shrinks to occupy the space
> previously taken up by the other one).
>
> I thought this would be simple ... loop some number of times, adjusting
> the "rect" of each image - then find a suitable "wait" value to slow it
> down.
>
> In fact, it is unbearably slow - even for medium sized images (320*240
> swapping with a 320*480) each step is clearly visible.
> For 2 images of 160*120 it's almost a smooth animation - I'm not sure if
> it's just that they are smaller sizes, or if it's the fact that the
> sizes remain the same. (all on medium laptop - Pentium P4 2.8G with
> low-end ATI graphics)
>
> It does look OK on a top of the range Pentium laptop with ATI92xx
> graphics (my wife needs high-end hardware to play Sims :-), but that's
> not exactly typical hardware yet.
>
> Is there some other way I should be approaching this ?
Without seeing exactly what you're doing, I'll go out on a limb and guess
that yes, the images are too large for Rev to really do this smoothly. If
Rev had some kind of direct-to-screen option, this might be doable, but the
images are probably a bit large for Rev to do natively. Three suggestions:
1) If possible, map the images down to 8 bit color, no transparency. The
fewer calculations Rev has to do to render the image/s on the card, the
faster the transition can be.
2) If possible, don't do a "real" scaling effect. Instead, create the
in-between frames in advance and show those, for example, as icons of a
button. But again, given the size of the image, the delay between image
updates may still be too great, and of course, you probably want to do this
on-the-fly with any given images.
I just realized you mentioned Windows platform, so QT effects are probably
out. But FWIW, I've seen the QT effects do blend/dissolve effects very
quickly, though I'm pretty sure the advanced ones are limited to OSX.
Sorry the above isn't much help.
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