LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use "Read JPEG File VI "??

Solved!
Go to solution

Hi!

 

I have a question, I´m doing this:

 

I am using the "Read JPEG File VI " to select a photo and then show it in a box, everything is fine here, but my doubt is when the file explorer shows up to select the photo, it shows any kind of files, I mean, if there are PDF's, .doc, .xls, mp4 files, they appear. How can I do to if I want the file explorer to show just png or jpg files?

 

I will attach a screenshot of my code, it just read a photo from a path, then it is shown in a picturebox and the photo is fixed to fit in.

 

 

Sin título.png

 

 

Thank you!!!

0 Kudos
Message 1 of 3
(2,124 Views)
Solution
Accepted by topic author paco09

You can (1)  Use the File Dialog Express VI and specify a pattern label and pattern:  Enter something like 'JPEG images' for the label and '*.jpg;*.jpeg' for the pattern.  Or 'Images' and '*.png;*.jpg;*.jpeg;*.bmp'

 

If you need multiple filters you can try this

https://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-05-10-2010/m-p/1127402?query.id=3663527#M497...

 

unless you are using LV2019

 

https://forums.ni.com/t5/LabVIEW/Null-File-Dialog-Behavior-in-2019-amp-Forward-Compatible-Run/m-p/39...

 

(2) Right-click the path control and choose Browse options, specify the Label and Pattern.  

 

(3) Set the label and pattern for the path control using property nodes

Message 2 of 3
(2,096 Views)

Thank you  Darin!

0 Kudos
Message 3 of 3
(2,000 Views)