Hamed,
As I said it is not my code, but a quick look in it shows me this. (I have
made two conversions to C# to show how easy it is to read VB as C# the rest
is almost adding some (), {} and the ; and removing the end clauses.
Dim bm As Bitmap
In C# this is
Bitmap bm;
If TypeOf objData Is String Then
Dim fs As New FileStream(objData.ToString,
FileMode.Open)
in C# this is
FileStream fs = new FileStream(objDataToString, FileMode.Open);
bm = CType(Bitmap.FromStream(fs), Bitmap)
fs.Close()
Else
Try
bm = ConvertToBitmap(DirectCast(objData, Byte()),
78)
Catch
bm = ConvertToBitmap(DirectCast(objData, Byte()), 0)
End Try
End If
Dim h As Integer
Dim s As Double
Here is an image converted to a bitmap, so in my idea should using a bitmap
direct not change this code very much. However as I said in other words
already, bitmaps are not my favorite sport.
Cor