LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i get the right colormap for my image?

After I acquire a color image from my pci1411 frame grabber, I have an image object (name and pointer). The image was created using "IMAQ Create.vi" with RGB set as the image type. If I want to display this image, I can use "IMAQ ColorImageToArray.vi" and "Draw True-Color Pixmap.vi" to get a decent representation on my monitor. But if I want to save it as a jpeg, I have only the function "write JPEG File.vi" for writing a flattened pixmap to a jpeg file. This function requires a colormap as an input. My question is how do I get a color map to use as an input to this function?
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 1 of 4
(3,139 Views)
Can you post a simple version of your code? I assume you are using LabVIEW 6.1 because the LabVIEW 7 VI does not have a colormap terminal on write JPEG File.vi .
0 Kudos
Message 2 of 4
(3,139 Views)
After investigating the vi's inside the "write JPEG File,vi" I found that it requires an empty colormap array if the image is a color image. Leaving this terminal unwired is not an option. It returns an error when unwired. It suffices to right click the colormap terminal and pull down to "create->constant". The constant created in this way is an empty colormap array.
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 3 of 4
(3,139 Views)
Wow. Who would have thought that an empty color map would have solved the issue. Thanks for letting us know you found an answer.
0 Kudos
Message 4 of 4
(3,139 Views)