Available in the LEADTOOLS Imaging toolkit. |
LineProfile example for Visual Basic
Dim maxR As Long, maxG As Long, maxB As Long, i As Integer
LEAD1.LineProfile 10, 10, 220, 120
For i = 0 To LEAD1.LineProfileSize - 1
If LEAD1.LineProfileRed(i) > maxR Then maxR = LEAD1.LineProfileRed(i)
If LEAD1.LineProfileGreen(i) > maxG Then maxG = LEAD1.LineProfileGreen(i)
If LEAD1.LineProfileBlue(i) > maxB Then maxB = LEAD1.LineProfileBlue(i)
Next
MsgBox "maxR= " & maxR & ", maxG= " & maxG & ", maxB= " & maxB