Android View to Image Capture loadBitmapFromView(View v)

Here you can find the source of loadBitmapFromView(View v)

Description

load Bitmap From View

Declaration

public static Bitmap loadBitmapFromView(View v) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;
import android.graphics.Canvas;

import android.view.View;

public class Main {
    public static Bitmap loadBitmapFromView(View v) {
        Bitmap b = Bitmap.createBitmap(v.getWidth(), v.getHeight(),
                Bitmap.Config.ARGB_8888);
        Canvas c = new Canvas(b);
        v.layout(0, 0, v.getWidth(), v.getHeight());
        v.draw(c);// w ww .jav a  2  s.c om
        return b;
    }
}

Related

  1. printScreen(View v)
  2. printScreen(View v, int quality)
  3. shotScreen(View cv)
  4. view2Bitmap(View view)
  5. view2Bitmap(View view, boolean cache)
  6. getBitmapFromView()
  7. getBitmapFromView(View view)
  8. view2Bitmap(View view)
  9. view2Bitmap(View view)