Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

DrawLine2 does not work with RGB32 images

Using DrawLine2 with RGB32 images produces an error 31080 "Invalid image type". For the Graylevel value, I tried both "255" and "RGB(255, 255, 255)" without success.
In the help file, it says that DrawLine2 (unlike DrawLine) should work with U8, I16, SGL, RGB32, and HSL32 images.
 
A solution or workaround for this problem would be appreciated,
Victor
0 Kudos
Message 1 of 2
(3,007 Views)
Victor -

This is indeed a problem and I have filed a CAR with id 4GRFIH5G.

In the meantime, instead of using DrawLine2 you can use the overlay functionality and merge it on to the image to get the same effect.  Here's a quick example (assuming you have an image called Image):

Dim line as New CWIMAQLine
line.Initialize 10, 100, 200, 10
' Clear any existing overlays on the image
Image.Overlays(1).Clear
' Draw a red overlay line
Image.Overlays(1).DrawLine line, RGB(255, 0, 0)
' Merge the overlay on the image
Image.Overlays(1).Merge


Greg Stoll
Vision R&D
National Instruments
Greg Stoll
LabVIEW R&D
0 Kudos
Message 2 of 2
(3,005 Views)