title: convert Mat to Bitmap Opencv for Android
body: <p>I'm trying to covert a MAt to a Bitmap use following code :</p>
  
  <pre><code>    Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
      Mat tmp = new Mat (width,height,CvType.CV_8UC1,new Scalar(4));
      try {
      //Imgproc.cvtColor(seedsImage, tmp, Imgproc.COLOR_RGB2BGRA);
      Imgproc.cvtColor(seedsImage, tmp, Imgproc.COLOR_GRAY2RGBA, 4);
      Utils.matToBitmap(tmp, bmp);}
      catch (CvException e){Log.d("Exception",e.getMessage());}
  </code></pre>
  
  <p>my seedsImage is a Mat object.
  And the Exception and got is <code>10-09 22:15:09.418: D/Exception(2461): ..\..\modules\java\generator\src\cpp\utils.cpp:105: error: (-215) src.dims == 2 &amp;&amp; info.height == (uint32_t)src.rows &amp;&amp; info.width == (uint32_t)src.cols in function void Java_org_opencv_android_Utils_nMatToBitmap2(JNIEnv*, _jclass*, jlong, _jobject*, jboolean)
  </code>
  I tried to search through but no solution worked for me.
  Can anynone help?</p>