LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PNG to Picture to PNG corrupts file

Can anyone tell my what I am doing wrong in this VI.  It demonstrates a problem I am having in a larger application.  It will load and resave small png files but not large ones.  An example large png file is located at http://www.oasis-open.org/archives/uiml/200702/png00000.png . It gives no errors, just corrupts the file.
0 Kudos
Message 1 of 5
(3,233 Views)
Hi pake,

your picture is pretty big: 5400*3800 pixel * 3 byte per pixel will take ~58MB just for the picture data... Additional copies for a picture indicator and so on...

I couldn't open your vi in LV8.2, so I made my own small test vi. I took about 2GB of RAM to load your pic and save it with a different name. (Btw. with default compression the png was smaller than yours!) I took a while since Windows was swapping RAM heavily, but it worked...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,226 Views)
Yours did behave differently. It would load and save the original file. When I reduced to color of the original to 4 bits and tried it I got error 1 source = "C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\picture\jpeg.llb\Check Data Size.vi"
0 Kudos
Message 3 of 5
(3,213 Views)
I also noticed that reducing the png file color depth to black and white makes it work.
0 Kudos
Message 4 of 5
(3,188 Views)
I also noticed that reducing the png file color depth to black and white makes it work.
0 Kudos
Message 5 of 5
(3,188 Views)