Skip to main content

Posts

Showing posts with the label glow

How to make glow effect around a bitmap?

The following code is what I got so far. However, there are 2 issues: I want both inner and outer glow effects, which looking similar to the Photoshop's blending options. But I only managed to make the outer glow, if I set BlurMaskFilter.Blur.INNER or other value, the whole image is blocked, instead of just edges. Despite I set "FF" as alpha value, the glow color is still very dark. Bitmap alpha = origin.extractAlpha(); BlurMaskFilter blurMaskFilter = new BlurMaskFilter(5, BlurMaskFilter.Blur.OUTER); Paint paint = new Paint(); paint.setMaskFilter(blurMaskFilter); paint.setColor(0xffffffff); Canvas canvas = new Canvas(origin); canvas.drawBitmap(alpha, 0, 0, paint); return origin; Source: Tips4all