title: How to convert BMP image file to text file in VB
body: <pre><code>Imports System.Drawing.Imaging
  Imports System.Runtime.InteropServices
  Imports System.IO
  Public Class Form1
  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      ' Dim OpenFileDialog1 As OpenFileDialog
      'If OpenFileDialog1.ShowDialog &lt;&gt; Windows.Forms.DialogResult.Cancel Then
      'PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName)
      'End If
   Dim openFileDialog1 As OpenFileDialog = New OpenFileDialog
  
      ' Set filter options and filter index.
   openFileDialog1.Filter = "BMP Files (*.bmp)|*.bmp|All Files (*.*)|*.*"
   openFileDialog1.FilterIndex = 1
  
   openFileDialog1.Multiselect = True
  
      ' Call the ShowDialog method to show the dialogbox.
   Dim UserClickedOK As Boolean = openFileDialog1.ShowDialog
   PictureBox1.Image = Image.FromFile(openFileDialog1.FileName)
   End Sub
   End Class
  </code></pre>
  
  <p>With this piece of code I'm able to track  and open image. Now I want to access data of image and want to display. For this I have to convert image to text file. How is it possible?. In <code>C#</code> there is function called <code>Readimage</code>. What function will help me to read image in VB?</p>