(android图像处理)android之bitmap各种常用函数

maskBitmap.getPixels(pixels, 0, maskBitmap.getWidth()*2, 0, 0, maskBitmap.getWidth(), maskBitmap.getHeight());

Bitmap newBitmap = Bitmap.createBitmap(pixels, 0, maskBitmap.getWidth(), maskBitmap.getWidth(), maskBitmap.getHeight() * 4,Config.ARGB_8888);

Bitmap p_1 = BitmapFactory.decodeFile("data/data/com.test/filse/you.jpg");
    Bitmap p_2 = BitmapFactory.decodeFile("data/data/com.test/filse/test.jpg");

DisplayMetrics outMetrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
    int s_w = outMetrics.widthPixels;
    int s_h = outMetrics.heightPixels;


Bitmap t = Bitmap.createScaledBitmap(_3, 400, 400, false);
    OutputStream out = null;
try {
out = new FileOutputStream(new File("data/data/com.test/filse/new1.png"));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
    t.compress(CompressFormat.JPEG, 100, out);


Bitmap.creatBitmap(src,x,y,width,height,filter);


你可能感兴趣的:((android图像处理)android之bitmap各种常用函数)