Bitmap bitmap= BitmapFactory.decodeResource(getResources(), R.drawable.face_scan_line); //安装比例创建一个新的bitmap bitmap = Bitmap.createScaledBitmap(bitmap, length, bitmap.getHeight(), true);