Skip to content

Commit 1e358c5

Browse files
committed
Update
1 parent 154f12a commit 1e358c5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class FastBlurUtility {
1818

1919
private static final float SCALE_FACTOR = 0.10f;
20-
private static final int BLUR_RADIUS = 8;
20+
private static final int BLUR_RADIUS = 10;
2121

2222
// Executor để xử lý các tác vụ nặng ngoài UI Thread
2323
private static final ExecutorService executor = Executors.newSingleThreadExecutor();
@@ -81,7 +81,7 @@ private static Bitmap takeScreenShot(Activity activity) {
8181
if (view.getWidth() <= 0 || view.getHeight() <= 0) return null;
8282

8383
// Dùng RGB_565 để tiết kiệm 50% bộ nhớ so với ARGB_8888 (phù hợp SDK 23+)
84-
Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);
84+
Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
8585
Canvas canvas = new Canvas(bitmap);
8686
view.draw(canvas);
8787
return bitmap;
@@ -91,7 +91,7 @@ private static Bitmap takeScreenShot(Activity activity) {
9191
}
9292

9393
private static Bitmap scaleAndDim(Bitmap bitmap, int targetW, int targetH) {
94-
Bitmap output = Bitmap.createBitmap(targetW, targetH, Bitmap.Config.RGB_565);
94+
Bitmap output = Bitmap.createBitmap(targetW, targetH, Bitmap.Config.ARGB_8888);
9595
Canvas canvas = new Canvas(output);
9696

9797
Paint paint = new Paint(Paint.FILTER_BITMAP_FLAG | Paint.ANTI_ALIAS_FLAG);

0 commit comments

Comments
 (0)