09-28-2010 12:42 PM
Hello,
I am attempting to save an unsigned 8-bit intensity graph into a jpg. The data comes from an IDS uEye camera, and displays well, but a) will not write to jpg/png, b) writes distorted bmp (looks like data loss/compression). The error output is code #1 from the Check Color Table Size.vi. As you can see, I do not have a color table wired into flatten pixmap-- is that my problem? If so, what do I input? I cannot find any information to clear this up. It's a greyscale, 0-255 image.
I have also tried:
a) invoke node on the front panel display. This does not work because I must save a 2560x1920 image while displaying a smaller image on the front panel. b) This advice: http://forums.ni.com/t5/LabVIEW/How-do-you-flatten-an-8-bit-pixmap-with-a-black-and-white-color/m-p/... , which recommends replicating the 8-bit array 3 times, piping that through interleave 1D arrays, then to the 24-bit input option in WriteJpeg. However, my arrays are 2D.
Please advise me on fixing this routine (attached PNG), or suggesting a better strategy altogether (I'm trying to avoid IMAQ and the Vision module).
Thanks!
Warren Harding
Solved! Go to Solution.
09-28-2010 01:03 PM - edited 09-28-2010 01:04 PM
I would use the following to generate the color table. I usually create a constant from the color table Array indicator and use that whenever I do this.
09-28-2010 02:12 PM
Well done. This works now.