title: Byte array image to bitmap
body: <p>I'm trying to convert the byte array image to bitmap, but after conversion it gives me black image, why? </p>
  
  <pre><code>// Camera arg conversion to Bitmap
                  Bitmap cameraBitmap = BitmapFactory.decodeByteArray(arg0, 0,
                          arg0.length);
                   Bitmap background = Bitmap.createBitmap(cameraBitmap.getWidth(),
                   cameraBitmap.getHeight(), Bitmap.Config.ARGB_8888);
  </code></pre>
  
  <p>I want the camera image converted to bitmap. Any suggestion. Thanks in advance!!</p>
  
  <pre><code>07-17 02:22:18.149: E/AndroidRuntime(398): FATAL EXCEPTION: main
  07-17 02:22:18.149: E/AndroidRuntime(398): java.lang.IllegalArgumentException: only support ImageFormat.NV21 and ImageFormat.YUY2 for now
  07-17 02:22:18.149: E/AndroidRuntime(398):  at android.graphics.YuvImage.&lt;init&gt;(YuvImage.java:82)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at com.exercise.AndroidCamera.AndroidCamera$4.onPictureTaken(AndroidCamera.java:225)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at android.hardware.Camera$EventHandler.handleMessage(Camera.java:320)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at android.os.Handler.dispatchMessage(Handler.java:99)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at android.os.Looper.loop(Looper.java:123)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at android.app.ActivityThread.main(ActivityThread.java:4627)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at java.lang.reflect.Method.invokeNative(Native Method)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at java.lang.reflect.Method.invoke(Method.java:521)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  07-17 02:22:18.149: E/AndroidRuntime(398):  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>