LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Vision: The image is not large enough for the operation (Imaq WriteToPNG.vi)

Solved!
Go to solution

Hello everyone, 

 

I've been stuck for a few days trying to get my VI working and getting this error. It's as simple as saving an Intensity Graph as an IMG, it works with JPEG but my graph is U16 grayscale and its not suported by jpeg format so I wasn't getting the desired results. Then I went for the PNG format and the error "The image is not large enough for the operation" appeared. I've already tried to resize it as the NI error help suggests, and got the same error, anyone has any Idea on what could be the problem? 

 

 

0 Kudos
Message 1 of 3
(6,340 Views)

Well, you chose to attach a picture of your VI, so I can't know the details about the Image, and I can't test it and modify it to make it work.  So I cooked up a demo that made an Intensity graph, then wrote it to a PNG file.  Worked just fine, I can see the PNG file, and there were no errors.  Unfortunately, while returning to the Forum to write this reply, (and this is true, by the way), I absent-mindedly closed LabVIEW, deleting my demo (which was called "untitled 1", of course).

 

So there is definitely something wrong with your code.  If you attach the code (meaning the VI itself), I, and others, can look at it and probably find the bug and explain it to you.  As it happened, I was sufficiently curious (having just done some work with PNGs and with Intensity graphs) that I was willing to do this "from scratch", but you'll get forum readers more willing to help if you help them by posting your code, not a picture of code.

 

Bob Schor

Message 2 of 3
(6,306 Views)
Solution
Accepted by topic author MrX_G

Hello Bob, 

 

Thanks for the advice, I will post my code in future questions (since I have already solved this one). As you said there was something wrong with my code, so  the code in the image actually worked fine, but the part where I wrote to the variable didn't (The variable wasnt being writen so its value was a 0x0 array, not large enough indeed). Thank you!

0 Kudos
Message 3 of 3
(6,293 Views)