LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create transitions (wipes)?

I have about 10 JPEG pictures in my CVI code. When I click on NEXT button the next picture is displayed. Now, what I want to do is create a transition from one picture to the next picture. How do I do this?

Thank you in advance.
0 Kudos
Message 1 of 6
(3,802 Views)
Hi Robert,

What do you mean by transition from one picture to the next? Do you want pictures to automatically display one after the other or you are looking for a more complex behavior like pictures fading in/out?

Are you using a Picture control and displaying your Jpeg's using DisplayImageFile function? If possible, post your code and please give more info about the behavior you would like to see.

Thanks and best regards,
Shakhina P.
NI
0 Kudos
Message 2 of 6
(3,780 Views)
By transitions (or wipes), I am refering to animations in-between slides such as a) current picture fading out as the next picture gets displayed or, b) current picture dissolve before the next picture is shown or, c) the next picture slides on top (and moves from left to right)of the current picture.

I have two separate codes which function as slides. (The codes are long and therefore not provided here).
1. The first uses CVI function call "DisplayImageFile()" to display bitmaps and other images. The question is how do I create transitions for this?
2. The second code I wrote uses Windows Media Player's activeX control to display JPEG pictures. (I tried this second method because CVI 7.0 does not have the functions to display JPEG pictures). I would like to create transitions for this also. How do I do this?

I hope this explains what I want to do.

Thank you again.
0 Kudos
Message 3 of 6
(3,776 Views)
Hi Robert,

Thanks for the clarification. There is no built-in CVI function that accomplishes what you are trying to do, but you could come up with the algorithm and implement your own functions to fade out/dissolve images. One way would be to use a Canvas control to display bitmaps and gradually change the pixels of the bitmap (using the Bitmap functions under User Interface Library).

Regarding sliding the pictures from top, left, etc. there is Animation control from Toolslib and a shipping example CVI71\samples\userint\custctrl\animate\animsample.prj that illustrates its usage. Also, attached is a program that creates a simple animation using bitmap canvas. Basically, it creates a bitmap background and loads the bitmap of image to be animated in memory. It then overlaps the image (that needs animation) over the background bitmap, while continuously refreshing the changed bitmap background.

While these examples are not exactly what you are looking for, they might help you get started.

Hope this helps a little and good luck with your application!
Shahina P.
NI
0 Kudos
Message 4 of 6
(3,746 Views)
Hi CVI 7.1 does have capability to show/display jpg files. (Not sure if 7.0 has or not)

Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 5 of 6
(3,737 Views)
JPEGs were added in 7.1

- luis
0 Kudos
Message 6 of 6
(3,724 Views)