cancel
Showing results for 
Search instead for 
Did you mean: 

picture fade out

Zguljo
Member

picture fade out

Hi all!

 

I would like to make picture at start of application to fade out (same size as front panel) in order to get menu which was previously in the back ground of the same picture. Can someone please give me an idea for that?

 

Thanks,

Vedran

27 REPLIES 27
Norbert_B
Proven Zealot

Re: picture fade out

Vedran,

 

there are many options, but all condense down to: transparency. 

I think the easiest method is to use a seperate VI (splash screen) and use the Front Panel Window:Run VI Transparently Property to fade the whole VI frontpanel out.

This might get a bit tricky for positioning under different resolutions of the systems the application should run on, but still quite easy to solve.

 

hope this helps,

Norbert 

 

PS: Please note that when faded out, the splash screen VI has to be quit. 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Wiebe@CARYA
Active Participant

Re: picture fade out

If you want a splash screen to fade away, and have the real main VI appear,
it is a lot easier.

Make a VI with the picture. Make it floating, or modal. Also, set the
transparancy (in VI Properties>window appearance) to 0%, but make sure the
value is tagged. You can make the splash screen the same size as the caller
(main) vi with property nodes.

Now, in a while loop, simply put 0 to 100 in the Panel>Transparency property
of the VI. Put a 10 ms wait in it, and the front panel of the VI will
dissapear in about 1 second.


If you want to do it with a picture control in the same VI, it is a bit more
difficult.

First you need to get a picture of the VI with a VI method. Get it's 2D
array of pixels with "Unflatten Image". Do the same with the splash picture.

Now, in a dubble for loop for each pixel, alpha blend the to pixels of the
two images using out = a * x + b * ( 1 - x ), where x is the iteration (0 -
1), and a and b are the pixels from picture A and picture B... If both
pictures are the same size, it is easier.

You can optimize this, but the idea is the same. You don't have to use the
two for loops, and you don't even have to use the unflatten image, but it is
easier to get started.

When done, hide the picture control with a property node.

Regards,

Wiebe.


Zguljo
Member

Re: picture fade out

Thank you guys very much. I'll give it a try, particulary the idea with pic in other VI with tagged transparency for loop control.

 

Thanks one again, regards

Vedran

Yamaeda
Proven Zealot

Re: picture fade out

As i'm thinking of adding a splash screen to our project i tried the ideas mentioned and found a bug.

 

Removing Title bar slow the transition by a factor 4!

 

With 20 ms loops i get a beutiful 2 sec transition on my modal application with 0% tranparacy (custom setting), but removing the Show Title bar makes it a ~8 sec transition, any ideas?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Wiebe@CARYA
Active Participant

Re: picture fade out

I can't reproduce it in LV 8.5.1.

What version are you using?

Regards,

Wiebe.


Yamaeda
Proven Zealot

Re: picture fade out

I'm using LabVIEW 8.2
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
wiebe@CARYA
Knight of NI

Re: picture fade out

Message contains an attachment

It works properly in 8.2.1 as well. Try running this in 8.2.

 

Regards,

 

Wiebe.

Neil.Pate
Active Participant

Re: picture fade out

Based on the advice from Wiebe I made my splash screen fade out using transparency.

 

Oddly enough, on a batch of PCs that are clones of each other (identical HW, with the OS imaged from a single source) it fades out at different speeds. Some run far slower than the others, and I have no idea why!

Yamaeda
Proven Zealot

Re: picture fade out

Message contains an attachment

I just tried the 8.2.1 you posted and it worked fine ... for 15 secs Smiley Happy

 

I noticed my splash is alot bigger, so i copied your picture 3 times and tried it again, and most of the behaviour is back.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer