MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / grayToAlpha

Method grayToAlpha

src/com/cloudream/ishow/algorithm/Effect.java:246–256  ·  view source on GitHub ↗
(final Bitmap bitmap)

Source from the content-addressed store, hash-verified

244 }
245
246 public static Bitmap grayToAlpha(final Bitmap bitmap)
247 {
248 if(bitmap == null)
249 return null;
250
251// Bitmap result = bitmap.copy(Bitmap.Config.ARGB_8888, true);
252 Bitmap result = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
253 result.setHasAlpha(true);
254 nativeGrayToAlpha(bitmap, result);
255 return result;
256 }
257
258 public static Bitmap colorToAlpha(int color, final Bitmap bitmap)
259 {

Callers

nothing calls this directly

Calls 2

nativeGrayToAlphaMethod · 0.95
createBitmapMethod · 0.80

Tested by

no test coverage detected