[android] Capture area

private Bitmap captureArea(final View v, final int x, final int y, final int width, int height)
{
  v.setDrawingCacheEnabled(true);
  Bitmap bitmap = Bitmap.createBitmap(v.getDrawingCache(), x, y, width, height);
  v.destroyDrawingCache();
  v.setDrawingCacheEnabled(false);
  return bitmap;
}

 

도움받은 곳 : https://www.linkedin.com/groups/How-save-specific-area-in-76373.S.5847401537088823300