Open top menu


Via This method you have implement the glow effect on imageView in android, try this code


public Bitmap highlightImage(Bitmap src) {

 Bitmap bmOut = Bitmap.createBitmap(src.getWidth() + 0, src.getHeight() + 0,                                     Bitmap.Config.ARGB_8888);

 Canvas canvas = new Canvas(bmOut);
 
 Paint ptBlur = new Paint();
 ptBlur.setMaskFilter(new BlurMaskFilter(40, Blur.NORMAL));
 int[] offsetXY = new int[2];
 
 Bitmap bmAlpha = src.extractAlpha(ptBlur, offsetXY);

 Paint ptAlphaColor = new Paint();
 ptAlphaColor.setColor(0xFFFFFFFF);

 canvas.drawBitmap(bmAlpha, offsetXY[0], offsetXY[0], ptAlphaColor);
 
 bmAlpha.recycle();

 canvas.drawBitmap(src, 0, 0, null);
 
 return bmOut;
}

0 comments