我正在开发 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()
);