title: How to convert ImageView image to byte code by using Base64 encode?
body: <p>I am working with an image. In my application I have displayed an image from drawable and set that drawable image to ImageView. When I click on a button I would like to encode the ImageView image to byte code by using Base64.</p>
  
  <p>I have implemented code as follows:</p>
  
  <pre><code>((ImageView)findViewById(R.id.imageView1)).setImageResource(R.drawable.person);
  
  ((Button)findViewById(R.id.button1)).setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
          ((TextView)findViewById(R.id.textView1)).setText("Get((ImageView)findViewById(R.id.imageView1)) image Base64.encode() here");
      }
  });
  </code></pre>
  
  <p>How can I get the encoded imageView1 image to byte code?</p>
  
  <p>Can anybody please help me. </p>