Skip to content

Commit a5efbcd

Browse files
committed
Update
1 parent d124be7 commit a5efbcd

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

app/src/main/java/com/omarea/common/ui/FastBlurUtility.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ private static Bitmap scaleAndDim(Bitmap bitmap, int targetW, int targetH) {
7676
// Tạo bộ lọc màu để giảm độ sáng (contrast 0.85f ~ giảm 15% độ sáng)
7777
ColorMatrix cm = new ColorMatrix();
7878
float contrast = 0.95f;
79+
float brightness = 30f;
7980
cm.set(new float[]{
80-
contrast, 0, 0, 0, 0,
81-
0, contrast, 0, 0, 0,
82-
0, 0, contrast, 0, 0,
81+
contrast, 0, 0, 0, brightness,
82+
0, contrast, 0, 0, brightness,
83+
0, 0, contrast, 0, brightness,
8384
0, 0, 0, 1, 0});
8485
paint.setColorFilter(new ColorMatrixColorFilter(cm));
8586

0 commit comments

Comments
 (0)