-
March 7th, 2004, 02:53 AM
#1
Vb2vc++
Hello,
Could anybody pls help me in converting the coming vb code to VC++ code :
With my thanks in advance
Code:
Const alpha = 1.5
Dim x As Integer
Dim y As Integer
Dim i As Integer
Dim n As Integer
Dim resultTable(0 To 255) As Byte
' build a result table for lookup ...
For n = 0 To 22
For i = 0 To 255
resultTable(i) = clip(128 + alpha * (i - 128))
Next i
Next n
' apply result table to the image ...
For y = 1 To PicInfo.bmHeight
For x = 1 To PicInfo.bmWidth
img(1, x, y) = resultTable(img(1, x, y))
img(2, x, y) = resultTable(img(2, x, y))
img(3, x, y) = resultTable(img(3, x, y))
Next x
Next y
-
March 8th, 2004, 01:20 AM
#2
phinds
vs2008, 3.5SP1 Version 9.0.21022.8 RTM
-
March 8th, 2004, 12:20 PM
#3
While conversion tools always seem like a good idea to develop, and having pondered the idea myself given the robust analysis tehcnology and parsers we have, true conversion always seems to be an elusive goal, mostly becuase the architectural and function differences are too much to be worthwhile. Theoretically, if you convert down to the bottom, you could do it, but that seems like a really large effort.
Anyway, most coversion does have to be done by someone conversant in both platforms. Good luck.
Mike Dershowitz
miked@lexientcorp.com
www.lexientcorp.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|