Click here to Skip to main content
16,012,223 members

Comments by Vishal Makwana (Top 13 by date)

Vishal Makwana 12-Apr-13 12:33pm View    
as you say i have change bitmap with their width and height so it work well.
thanks you very much.
Vishal Makwana 10-Apr-13 12:58pm View    
Dim red_fm_byte As Integer
Dim green_fm_byte As Integer
Dim blue_fm_byte As Integer

Dim mybitmap As Bitmap = Nothing

Try

Dim red_fm_file, green_fm_file, blue_fm_file As FileStream

red_fm_file = New FileStream("C:\Users\Er. Vishal\Desktop\Liss3_Quad_SYS\Liss3_Quad_SYS\9808111D024034L0400F2\n0o0y867.0fm", FileMode.Open, FileAccess.Read)
green_fm_file = New FileStream("C:\Users\Er. Vishal\Desktop\Liss3_Quad_SYS\Liss3_Quad_SYS\9808111D024034L0400F2\n0o0y867.0fn", FileMode.Open, FileAccess.Read)
blue_fm_file = New FileStream("C:\Users\Er. Vishal\Desktop\Liss3_Quad_SYS\Liss3_Quad_SYS\9808111D024034L0400F2\n0o0y867.0fo", FileMode.Open, FileAccess.Read)


Dim red_fm_length As Integer = red_fm_file.Length
Dim green_fm_length As Integer = green_fm_file.Length
Dim blue_fm_length As Integer = blue_fm_file.Length
For i = 0 To 700
For j = 0 To 500
red_fm_byte = red_fm_file.ReadByte()
green_fm_byte = green_fm_file.ReadByte()
blue_fm_byte = blue_fm_file.ReadByte()

'mybitmap.SetPixel(j1, i1, Color.FromArgb( red_fm_byte, green_fm_byte, blue_fm_byte))
mybitmap.SetPixel(j, i, Color.FromArgb(red_fm_byte, green_fm_byte, blue_fm_byte))

Next j
Next i




pic.Image = mybitmap


Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

==========================
As in my above code i get an Exception error i.e. "Object reference not set to an instance of an object" at "mybitmap.setpixel"
please help me.
Thanks in Advance.
Vishal Makwana 10-Apr-13 12:53pm View    
ok sorry.
& thanks for remind.
Vishal Makwana 10-Apr-13 12:44pm View    
yes this is my 99% of solution of my problem.
But it get generate an exception at
mybitmap.setpixel(j,i,color.FromArgb( , , ))
Vishal Makwana 10-Apr-13 12:38pm View    
As in my above code i get an Exception error i.e. "Object reference not set to an instance of an object"
at "mybitmap.setpixel" time

please help me.

Thanks in Advance.