Bitmap getRGB565(Bitmap bitmap){
int i = bitmap.getWidth();
int j = bitmap.getHeight(); //从上步解出的JPEG数组中接出BMP,即RAW->JPEG->BMP
Matrix localMatrix = new Matrix();
localMatrix.postRotate(0.0F, i / 2, j / 2);
Bitmap bitmap_res = Bitmap.createBitmap(i, j, Bitmap.Config.RGB_565);
Paint localPaint = new Paint();
localPaint.setDither(true);
Canvas localCanvas = new Canvas();
localCanvas.setBitmap(bitmap_res);
localCanvas.setMatrix(localMatrix);
localCanvas.drawBitmap(bitmap, 0.0F, 0.0F, localPaint);
return bitmap_res;
}
Bitmap ---> getRGB565 face检测
最新推荐文章于 2021-08-28 00:04:50 发布