11-18-2008 08:49 AM
This was posted on the LabView forum in error yesterday, Please excuse the dual post.
I am trying to open a JPEG image. If I do not know the image type (8U, 16I, GrayscaleSingle, ... etc)... is there a way to find out that information?
If you open the file using IMAQ ReadFile...you have to supply a Create Image input to allocate space...the input specifies a type to read...but if the type of the stored data is not the type specified in the read file you either read the file as the type specified, or the file does not produce any values...(and no error is produced).
Examples:
Store a JPEG as a Single Percision Floating point image.
Use a Creat File to specify that the file is read with the following types...with the following results
Type Specified Type Read Resulting image
U8 U8 8 bit image appears
16I 16I
Solved! Go to Solution.
11-18-2008 08:54 AM
11-19-2008 11:59 AM
Hummer1,
There are two methods to accomplish this:
1) IMAQ GetFileInfo, which has quite a few outputs involving the image details.
2) Read JPEG File, which you can unbundle the image data output to get the image depth, or other attributes.
I would reccomend the IMAQ function, due to it being more detailed.
Hope this helps
11-19-2008 12:19 PM
that's perfect...
I didn't see that...thanks for the tip.
Sometimes the simple and straightforward hides in the fog of diversity and capable.
Humming once again.