private static Bitmap getBitmapFromNative(Bitmap bitmap) {
int width = nativeGetBitmapWidth();
int height = nativeGetBitmapHeight();
if (bitmap == null || width != bitmap.getWidth()
|| height != bitmap.getHeight() || !bitmap.isMutable()) { // in
Config config = Config.ARGB_8888;
if (bitmap != null) {
config = bitmap.getConfig();
bitmap.recycle();
}
bitmap = Bitmap.createBitmap(width, height, config);
}
int[] pixels = new int[width];
for (int y = 0; y < height; y++) {
nativeGetBitmapRow(y, pixels);
bitmap.setPixels(pixels, 0, width, 0, y, width, 1);
}
return bitmap;
}
PhotoProcessing.java 文件源码
java
阅读 46
收藏 0
点赞 0
评论 0
项目:MontageCam
作者:
评论列表
文章目录