Hello,
I have running program on VB that interfaces with hamamatsu x ray sensor.
it is 2340x2368 with 14b intensity ( BW )

I made dll that will generate array of 2340x2368 long, 1D using labview

my painting function is running on new thread but it takes around 4s to process this image, this is too long for me.

Code:
    Dim DCAM_Image(5541120) As UInt16
    Dim myBitmap As New Bitmap(2368, 2340)

                While y < 2340
                    x = 0
                    While x < 2368
                        Data = DCAM_Image(index)
                        If Data < min Then
                            Data = min
                        End If
                        If Data > max Then
                            Data = max
                        End If
                        Data = (Data - min) / ((max - min) / 255) ' scaling to 8b
                        myBitmap.SetPixel(x, y, Color.FromArgb(Data, Data, Data)) ' this is what use nearly all the time in the thread
                        x = x + 1
                        index += 1
                    End While
                    y = y + 1
                End While
How can i speed this up, sure i should be able to get at least 10-20FPS.

And at the same time, how could i save this image in 14b color depth ? since scaling to 256 /8b will lose lot of information :/
Name:  0.jpg
Views: 528
Size:  43.4 KB