About 236,000 results
Open links in new tab
  1. android - How to draw a bitmap with transparency - Stack Overflow

    Mar 20, 2011 · How to draw a bitmap with a given color set as transparent? For example I want all white pixels to be transparent. You need to set the Alpha value for the paint you're passing to the Bitmap. http://developer.android.com/reference/android/graphics/Paint.html#setAlpha%28int%29. Values vary from 0-255. EDIT: I don't get it.

  2. Transparent sections in a view in Android | by Arun Badole | The ...

    Nov 14, 2018 · This tutorial gives you idea to create view with transparent sections. You can create any shape with any size for such views. You can tell your ideas & implementations in the comments.

  3. How to Draw Translucent Bitmaps on Canvas in Android?

    Drawing translucent bitmaps on Android's Canvas involves using the `Paint` class to set the alpha value, which controls the transparency of the bitmap. This method allows for blending images with background elements seamlessly, enhancing the visual richness of your application.

  4. Create a transparent bitmap from an existing bitmap by ... - Java2s

    * create a transparent bitmap from an existing bitmap by replacing certain. * color with transparent. * @param bitmap. * the original bitmap with a color you want to replace. * @return a replaced color immutable bitmap. */ public static Bitmap createTransparentBitmapFromBitmap(Bitmap bitmap, int replaceThisColor) {

  5. android - How to make bitmap transparent? - Stack Overflow

    Feb 26, 2013 · Using adjustOpacity, I make ImageView's Bitmap be semi-transparent. Bitmap newBitmap = adjustOpacity(orignalBitmap, 10); view.setImageBitmap(newBitmap); view.setBackgroundColor(Color.WHITE); However, Imageview show …

  6. android.graphics.Color#TRANSPARENT - ProgramCreek.com

    The following examples show how to use android.graphics.Color#TRANSPARENT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

  7. How do I make pixels of a certain color on a Bitmap become transparent

    Jun 2, 2018 · I have a function that takes a Bitmap argument, and is meant to return the same Bitmap but with all black pixels turned into transparent. Bitmap transparent = bitmap.copy( Bitmap.Config.ARGB_8888 , true); int[] pixels = new int[transparent.getHeight()*transparent.getWidth()];

  8. make Bitmap Image Transparent - Android Graphics - Java2s

    public static Bitmap makeTransparent(Bitmap alphaGray, Bitmap src) { int width = src.getWidth(); int height = src.getHeight(); int [] alphaPix = new int [width * height]; alphaGray.getPixels(alphaPix, 0, width, 0, 0, width, height); int count = width * height; for (int i = 0; i < count; ++i) { alphaPix[i] = alphaPix[i] << 8;

  9. android - How to make some part of bitmap transparent ... - Stack Overflow

    May 11, 2015 · I need to make the black part of image transparent and obtain circular bitmap. the transparent method that i used: public static Bitmap makeTransparent(Bitmap bitmap, int replaceThisColor) { if (bitmap != null) { int picw = bitmap.getWidth(); int pich = bitmap.getHeight(); int[] pix = new int[picw * pich];

  10. How to clip a part of a bitmap in Android | by Yves Delcoigne

    Sep 28, 2019 · Last week, someone at work asked me how he could achieve the following: have a dark overlay on a QR code scanner, with only the center part fully transparent. While my initial thought was to...

  11. Some results have been removed
Refresh