Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.hardware.Camera; public class Main { public static Bitmap takePic(byte[] data, Camera camera) { Bitmap res = BitmapFactory.decodeByteArray(data, 0, data.length); // ScreenShot.savePic(res, // ServerConstant.SHOT_CAM_TEMP_BG_LOC); return res; } }