android-gpuimage
android-gpuimage copied to clipboard
Use GPUImageFilterGroup when image is center_ Inside mode is invalid to change the background color in GPUImageView
What does this change?
Added the method of setting the background color, and adjust the order of the filter drawing
What is the value of this and can you measure success?
It can change the background color when gpuimageview is invalid,for example the ImageActivity
Screenshots

gpuImage.setScaleType(GPUImage.ScaleType.CENTER_INSIDE)
gpuImage.filter = GPUImageFilterGroup(listOf(GPUImageBrightnessFilter(),
GPUImageSaturationFilter(),
GPUImageWhiteBalanceFilter(),
GPUImageSharpenFilter())).apply {
setBackgroundColor(0.27f, 0.27f, 0.27f)
}
gpuImage.setBackgroundColor(1f,1f,1f)
gpuImage.setImage(Uri.parse("file:///android_asset/image.png"))
This fix is great. It saves lots of time.