我正在开发Android相机应用程序,我想在我的相机预览中应用这个像素化层?请帮助!
bitmap = Pixelate.fromAsset(
getAssets(), "a3.png",
new PixelateLayer.Builder(PixelateLayer.Shape.Square)
.setResolution(32)
.build(),
new PixelateLayer.Builder(PixelateLayer.Shape.Circle)
.setResolution(32)
.setOffset(15)
.build(),
new PixelateLayer.Builder(PixelateLayer.Shape.Circle)
.setResolution(32)
.setSize(26)
.setOffset(13)
.build(),
new PixelateLayer.Builder(PixelateLayer.Shape.Circle)
.setResolution(32)
.setSize(18)
.setOffset(10)
.build(),
new PixelateLayer.Builder(PixelateLayer.Shape.Circle)
.setResolution(32)
.setSize(12)
.setOffset(8)
.build()
);