Skip to content

Conversation

xuzhiyong017
Copy link

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

微信图片_20210722143423

        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"))

xuzhiyong added 2 commits July 22, 2021 15:25
…und color in GPUImageView by setBackgroundColor. It need be modified in GPUImageFilterGroup

(cherry picked from commit 0702785)
@longdt57
Copy link

This fix is great. It saves lots of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants