Flying images

gamez
02-15-2005, 02:44 AM
I am looking for a sample project that explains some of the following animations on JPEG's:
- move into, around and out
- zoom in & out
- appear/disappear, transparency
- flip, turn, rotate (all 3 axes)
- distort, explode, pixelize

Besides powerpoint, which would be dramatically oversized, I do not know of a suitable freeware for this, so I would like to develop such an image viewer/slideshow pgm myself, maybe with some scripting capabilities.

Thanks a lot for your hints.

passel
02-15-2005, 06:37 AM
I am looking for a sample project that explains some of the following animations on JPEG's:...

Well, I think you've come to the right place.
There is a Search button between the "FAQ" and "Quick Links" buttons at the top of the page. Look around all you want.

gamez
02-15-2005, 07:54 AM
@passel

Well, after 3 or 4 hours, I have been able indeed this morning to localize that button and do some searching in this forum... and then decided to post.

Maybe someone (else) here around already has a rudimentary project on the matter or a helpful hint.

CU, gamez.

lebb
02-15-2005, 09:07 AM
This isn't a code handout site, but if you'll provide more detail about specifically which area(s) you're having trouble with and what code you are trying, we'll be happy to help. So far your question is too vague to provide much help (except to reiterate passel's suggestion to look for each of those topics here using a search).

gamez
02-15-2005, 12:53 PM
:confused: :confused: :confused:
I think the objectives are clear, I really don't get what other keywords I should put in my description above. I'm looking for a promising starting point, either in this forum or elsewhere.

Even a negative post like "there are no adequate APIs for this, you definitely need developer tool xyz and it will cost you blahblahblah" would have been more constructive than what I've read so far.

Just forget my question, apparently it's too demanding.

lebb
02-15-2005, 02:40 PM
It's not too demanding, just too vague.

For example,
- What do you mean by "move into, around, and out" and how does that differ from zooming?
- You mention zooming on your list, and yet it is a very frequent topic of discussion here, so I'm assuming a search will have at least gotten you started enough to have some code to work from. If so, what part are you having trouble with? If not, why not?
- Ditto transparency and rotation, at least.

gamez
02-16-2005, 01:57 AM
@lebb
Thank you very much, I appreciate your post.

OK, here's the scenario:

Imagine you have an empty form (maybe with a nice background) and the first chosen image moves in from the left, right, bottom or top and than along a given path to the frame's center ("moving"). Then, it would just disappear in the distance of the frame's center point ("zoom out") while another picture appears elsewhere in the form, tiny and transparent at first, then getting less translucent and bigger ("zoom in") over time. A third picture comes in, rolling and rotating, then fills the whole frame and explodes into pixels...

My question is:
I have already programmed static image display with LoadPicture, PaintPicture, but no animations like the ones described above. As I am only starting the project, I have no code to show you. I am wondering what API (GDI? DirectX?) functions exist in that area, or maybe some add-on ActiceX I could use. I'm looking for a starting point that could guide me.

CU, gamez.

zelg37
02-17-2005, 06:09 PM
Imagine you have an empty form (maybe with a nice background) and the first chosen image moves in from the left, right, bottom or top and than along a given path to the frame's center ("moving"). Then, it would just disappear in the distance of the frame's center point ("zoom out") while another picture appears elsewhere in the form, tiny and transparent at first, then getting less translucent and bigger ("zoom in") over time. A third picture comes in, rolling and rotating, then fills the whole frame and explodes into pixels...
That's quite an ambitious set of graphic effects!

I think you have quite a steep learning curve ahead of you, but here's some links that will hopefully get you started...

For animation with transparency use bitblt. The following thread contains an example of animation with transparency ("BitBlt_Walking_Man_ Demo.zip") a link to a design time mask creation tool ("AutoSpritemaskCreator"),and a link to a Gary Beebe tutorial on using Bitblt and masks to create transparency (on Lucky's site):
http://www.xtremevbtalk.com/t129548.html

Zooming an image in and out (resizing) should be done via the Stretchblt (instead of Bitblt). An example of using Stretchblt can be found attached to this post:
http://www.xtremevbtalk.com/showpost.php?p=872689

There's also a nice "Zoom and Pan Demo" at the bottom of this page:
http://www.mvps.org/EDais/Files/Demo/Page5.html

Achieving variable levels of transparency (or opacity) is called alphablending, which is done using the AlphaBlend API. There's a little tutorial on this page (and you'll find more examples if you do a search for "alphablend"):
http://nascimentoweb.com.sapo.pt/VBTuts/BasicAlphaBlending.htm

Some posts with attached examples of using Visual basic to distort an image's shape:
http://www.xtremevbtalk.com/showpost.php?p=526934
http://www.xtremevbtalk.com/t116399.html

Rotation example:
http://www.xtremevbtalk.com/showpost.php?p=214487

gamez
02-18-2005, 02:59 PM
@zelg37
Thank you, that's the kind of motivating post I was looking for. Be sure I will go through your list.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum