Skip to content

How to decrease black colour for ColorMatrix. #1

Closed
@moonandroid

Description

@moonandroid

Hello,
I have used this code snippet,how i can reduce black color over here.

 ColorMatrix colorMatrix = new ColorMatrix();
        colorMatrix.setSaturation(0);
        float brightness = (float)(bar.getProgress());//it can be 0-128
        float m = 205f;
        float t = -255*brightness;
        ColorMatrix threshold = new ColorMatrix(new float[] {
                m, 1, 0, 1, t,
                0, m, 1, 1, t,
                1, 0, m, 1, t,
                0, 1, 0, 1, 0
        });

After above implementation image become too black.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions