[android-developers] Re: How to set the bitmap to Transparent

2016-07-11 Thread Rizwan Asif
Hey Parry, I used a loop to achieve this. _Cropped = Bitmap.createBitmap(width, height, _BMAP.getConfig()); for(int i=0; i<_Cropped.getWidth(); i++){ for(int j=0; j<_Cropped.getHeight(); j++){ _Cropped.setPixel(i,j, Color.TRANSPARENT); } } On Monday, 2 April 2012 20:54:47 UTC+5

[android-developers] Re: How to set the bitmap to Transparent

2012-08-29 Thread Nitin choudhary
Thanks, its help me a lot. Nitin Choudhary On Monday, April 2, 2012 9:24:47 PM UTC+5:30, Perry168 wrote: > > hi, > > I used following method to create a canvas. > > temp = Bitmap.createBitmap(thisWidth, thisHeight, Config.ARGB_); > Canvas thisCanvas = new Canvas(temp); > > I don't know wh

[android-developers] Re: How to set the bitmap to Transparent

2012-08-21 Thread Tiago Braga Machado
How set blackground of bitmap? I use so: mBitmap = Bitmap.createBitmap(x, y, Bitmap.Config.ARGB_); mCanvas = new Canvas(mBitmap); @Override protected void onDraw(Canvas canvas) { canvas.drawColor(Color.WHITE); canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);

Re: [android-developers] Re: How to set the bitmap to Transparent

2012-04-02 Thread Perry
Hi Justin, I success now! Thank you for your solution. I fault as before because I had a foolish mistake. Thanks again!. MagouyaWare於 2012年4月3日星期二UTC+8上午12時42分52秒寫道: > Are you sure that it is the bitmap that has the black background? How are > you using the bitmap? Is it the background or

Re: [android-developers] Re: How to set the bitmap to Transparent

2012-04-02 Thread Justin Anderson
Are you sure that it is the bitmap that has the black background? How are you using the bitmap? Is it the background or foreground of an ImageView? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Apr 2, 2012 at 10:33 AM, Perry wrote: > hi, > tha

[android-developers] Re: How to set the bitmap to Transparent

2012-04-02 Thread Perry
hi, thank you for help. but the background still black. On 4月3日, 上午12時05分, Justin Anderson wrote: > First, you should use ARGB_... ARGB_ is > deprecated:http://developer.android.com/reference/android/graphics/Bitmap.Config... > > Next, here is how to do it: > > temp = Bitmap.createBitmap