02-10-2012 06:51 AM
I have a program that loads .PNG files and dislpays them to the user. I have 50+ files that load fine, all of which are less then 10kB. I have a few files that will not load and they are slightly over 20kB.
When I us the "Read PNG.vi" it throws the following error: "Error 6 occurred at Read PNG File.vi"
Is there an issue with the "Read PNG.vi" that will not allow it to load larger PNG Files? Is there another way I can get the Image Data out of a PNG file without using the "Read PNG.vi"?
I have attached 2 .PNG files
1.) "Does Not Load.PNG" (This file does not load with the "Read PNG.vi" and is 23kB)
2.) "Loads.PNG" (This file loads fine with the "Read PNG.vi" and is 3kB)
I need to learn how to get the image data from the file that will not load.
Thanks
Brian
Solved! Go to Solution.
02-10-2012 07:01 AM - edited 02-10-2012 07:03 AM
The PNG file that is not loading is not actually a PNG file thats a JPEG file. So Open that file in mspaint and save it as .PNG and then try reading it. You can check the same thing with the other files that is not loading. If you have doubt use the function Read JPEG file.vi and check it.
02-10-2012 07:12 AM
I was given these files and assumed they were all .PNG's since the extensions were all PNG and they opened with Microsoft Picure Manager witout errors. How did you know they were JPG's so quick? Experience? Or could you tell by some other means...
Thanks
02-10-2012 07:21 AM
Ha ha ha.. Just a common sense .. I tried saving the file to my desktop and it gave me jpeg extension.. Try it just try saving the file you posted.