android Programming Glossary: config.argb_8888
Call to `getDrawingCache` returns null when scroll is enabled http://stackoverflow.com/questions/11560882/call-to-getdrawingcache-returns-null-when-scroll-is-enabled pageBmp Bitmap.createBitmap page.getWidth page.getHeight Config.ARGB_8888 Canvas canvas new Canvas pageBmp page.draw canvas Used the pageBmp..
Cropping Circular Area from bitmap in android http://stackoverflow.com/questions/11932805/cropping-circular-area-from-bitmap-in-android Bitmap.createBitmap bitmap.getWidth bitmap.getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final..
Masking(crop) image in frame http://stackoverflow.com/questions/12614542/maskingcrop-image-in-frame result Bitmap.createBitmap mask.getWidth mask.getHeight Config.ARGB_8888 Canvas mCanvas new Canvas result Paint paint new Paint Paint.ANTI_ALIAS_FLAG..
Android Maps API v2 draw circle http://stackoverflow.com/questions/13991301/android-maps-api-v2-draw-circle bitmap Bitmap b Bitmap.createBitmap radius 2 radius 2 Config.ARGB_8888 Canvas c new Canvas b draw blue area if area icon size if radius..
Bitmap image with rounded corners with stroke http://stackoverflow.com/questions/14473113/bitmap-image-with-rounded-corners-with-stroke Bitmap.createBitmap bitmap.getWidth bitmap .getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final..
Crop square image to circle - Programmitically http://stackoverflow.com/questions/15744119/crop-square-image-to-circle-programmitically Bitmap.createBitmap bitmap.getWidth bitmap.getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final..
How can i work with Android EffectFactory Class? http://stackoverflow.com/questions/15832169/how-can-i-work-with-android-effectfactory-class Bitmap bmpSephia Bitmap.createBitmap width height Bitmap.Config.ARGB_8888 Canvas canvas new Canvas bmpSephia Paint paint new Paint ColorMatrix.. r g b return Bitmap.createBitmap pixelArray width height Config.ARGB_8888 For Grayscale effect public Bitmap toGrayscale Bitmap bmpOriginal..
create circular image view in android [duplicate] http://stackoverflow.com/questions/16208365/create-circular-image-view-in-android bitmap.getWidth bitmap.getHeight Bitmap.Config.ARGB_8888 BitmapShader shader new BitmapShader bitmap TileMode.CLAMP TileMode.CLAMP.. drawable .getBitmap Bitmap bitmap b.copy Bitmap.Config.ARGB_8888 true int w getWidth h getHeight Bitmap roundBitmap getCroppedBitmap.. output Bitmap.createBitmap sbmp.getWidth sbmp.getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xffa19774 final..
How to create a background with Image, Rounded Corners without borders http://stackoverflow.com/questions/16695023/how-to-create-a-background-with-image-rounded-corners-without-borders Bitmap.createBitmap bitmap.getWidth bitmap .getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final..
Getting frames from Video Image in Android http://stackoverflow.com/questions/1893072/getting-frames-from-video-image-in-android Bitmap.createBitmap argb8888 camSize.width camSize.height Config.ARGB_8888 ... decode Y U and V values on the YUV 420 buffer described..
How to make an ImageView to have rounded corners http://stackoverflow.com/questions/2459916/how-to-make-an-imageview-to-have-rounded-corners Bitmap.createBitmap bitmap.getWidth bitmap .getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final..
How to draw a smooth/dithered gradient on a canvas in Android http://stackoverflow.com/questions/2936803/how-to-draw-a-smooth-dithered-gradient-on-a-canvas-in-android gradient Bitmap bitmap Bitmap.createBitmap 400 400 Config.ARGB_8888 Canvas c new Canvas bitmap c.drawCircle 200 200 200 p return..
Android: How to get a custom view to redraw partially? http://stackoverflow.com/questions/2949036/android-how-to-get-a-custom-view-to-redraw-partially this.cachedBitmap Bitmap.createBitmap getWidth getHeight Config.ARGB_8888 Change to lower bitmap config if possible. Canvas cacheCanvas..
BitmapFactory.decodeResource returns a mutable Bitmap in Android 2.2 and an immutable Bitmap in Android 1.6 http://stackoverflow.com/questions/4349075/bitmapfactory-decoderesource-returns-a-mutable-bitmap-in-android-2-2-and-an-immu source bitmap loaded using options.inPreferredConfig Config.ARGB_8888 FileChannel channel randomAccessFile.getChannel MappedByteBuffer..
Make certain area of bitmap transparent on touch http://stackoverflow.com/questions/5368774/make-certain-area-of-bitmap-transparent-on-touch getResources R.drawable.over .copy Config.ARGB_8888 true c2 new Canvas overlay pTouch new Paint Paint.ANTI_ALIAS_FLAG..
Capture picture from android webview http://stackoverflow.com/questions/7702565/capture-picture-from-android-webview pictureDrawable.getIntrinsicHeight Config.ARGB_8888 Canvas canvas new Canvas bitmap canvas.drawPicture pictureDrawable.getPicture..
Android: How to do this framing paint? http://stackoverflow.com/questions/9748206/android-how-to-do-this-framing-paint colored Bitmap.createBitmap mask.getWidth mask.getHeight Config.ARGB_8888 Canvas cv new Canvas colored cv.drawBitmap original 0 0 null..
photo/image-to-sketch algorithm http://stackoverflow.com/questions/9826273/photo-image-to-sketch-algorithm Bitmap source Bitmap layer Bitmap base source.copy Config.ARGB_8888 true Bitmap blend layer.copy Config.ARGB_8888 false IntBuffer.. source.copy Config.ARGB_8888 true Bitmap blend layer.copy Config.ARGB_8888 false IntBuffer buffBase IntBuffer.allocate base.getWidth base.getHeight..
Carousel library for android http://stackoverflow.com/questions/9838518/carousel-library-for-android width int height height imageReflectionRatio Config.ARGB_8888 final Canvas canvas new Canvas bitmapWithReflection canvas.drawBitmap.. Bitmap bmpSephia Bitmap.createBitmap width height Bitmap.Config.ARGB_8888 Canvas canvas new Canvas bmpSephia Paint paint new Paint ColorMatrix.. bwMatrix Bitmap rBitmap sampleBitmap.copy Bitmap.Config.ARGB_8888 true Paint paint new Paint paint.setColorFilter colorFilter..
Call to `getDrawingCache` returns null when scroll is enabled http://stackoverflow.com/questions/11560882/call-to-getdrawingcache-returns-null-when-scroll-is-enabled
Cropping Circular Area from bitmap in android http://stackoverflow.com/questions/11932805/cropping-circular-area-from-bitmap-in-android public Bitmap getCroppedBitmap Bitmap bitmap Bitmap output Bitmap.createBitmap bitmap.getWidth bitmap.getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final Paint paint new Paint final Rect rect new Rect 0 0 bitmap.getWidth..
Masking(crop) image in frame http://stackoverflow.com/questions/12614542/maskingcrop-image-in-frame getResources R.drawable.mask Bitmap result Bitmap.createBitmap mask.getWidth mask.getHeight Config.ARGB_8888 Canvas mCanvas new Canvas result Paint paint new Paint Paint.ANTI_ALIAS_FLAG paint.setXfermode new PorterDuffXfermode PorterDuff.Mode.DST_IN..
Android Maps API v2 draw circle http://stackoverflow.com/questions/13991301/android-maps-api-v2-draw-circle if radius icon.getWidth 2 radius icon.getWidth 2 create empty bitmap Bitmap b Bitmap.createBitmap radius 2 radius 2 Config.ARGB_8888 Canvas c new Canvas b draw blue area if area icon size if radius icon.getWidth 2 c.drawCircle radius radius radius paint1..
Bitmap image with rounded corners with stroke http://stackoverflow.com/questions/14473113/bitmap-image-with-rounded-corners-with-stroke getRoundedCornerBitmap Bitmap bitmap int pixels Bitmap output Bitmap.createBitmap bitmap.getWidth bitmap .getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final Paint paint new Paint final Rect rect new Rect 0 0 bitmap.getWidth..
Crop square image to circle - Programmitically http://stackoverflow.com/questions/15744119/crop-square-image-to-circle-programmitically getclip 30 20 paint public Bitmap getclip Bitmap output Bitmap.createBitmap bitmap.getWidth bitmap.getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final Paint paint new Paint final Rect rect new Rect 0 0 bitmap.getWidth..
How can i work with Android EffectFactory Class? http://stackoverflow.com/questions/15832169/how-can-i-work-with-android-effectfactory-class bmpOriginal.getHeight width bmpOriginal.getWidth int depth 20 Bitmap bmpSephia Bitmap.createBitmap width height Bitmap.Config.ARGB_8888 Canvas canvas new Canvas bmpSephia Paint paint new Paint ColorMatrix cm new ColorMatrix cm.setScale .3f .3f .3f 1.0f ColorMatrixColorFilter.. depth if r 255 r 255 if g 255 g 255 pixelArray i Color.rgb r g b return Bitmap.createBitmap pixelArray width height Config.ARGB_8888 For Grayscale effect public Bitmap toGrayscale Bitmap bmpOriginal int width height height bmpOriginal.getHeight width..
create circular image view in android [duplicate] http://stackoverflow.com/questions/16208365/create-circular-image-view-in-android code but its not working fine code Bitmap circleBitmap Bitmap.createBitmap bitmap.getWidth bitmap.getHeight Bitmap.Config.ARGB_8888 BitmapShader shader new BitmapShader bitmap TileMode.CLAMP TileMode.CLAMP Paint paint new Paint paint.setShader shader.. null return if getWidth 0 getHeight 0 return Bitmap b BitmapDrawable drawable .getBitmap Bitmap bitmap b.copy Bitmap.Config.ARGB_8888 true int w getWidth h getHeight Bitmap roundBitmap getCroppedBitmap bitmap w canvas.drawBitmap roundBitmap 0 0 null public.. bmp radius radius false else sbmp bmp Bitmap output Bitmap.createBitmap sbmp.getWidth sbmp.getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xffa19774 final Paint paint new Paint final Rect rect new Rect 0 0 sbmp.getWidth..
How to create a background with Image, Rounded Corners without borders http://stackoverflow.com/questions/16695023/how-to-create-a-background-with-image-rounded-corners-without-borders getRoundedCornerBitmap Bitmap bitmap int pixels Bitmap output Bitmap.createBitmap bitmap.getWidth bitmap .getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final Paint paint new Paint final Rect rect new Rect 0 0 bitmap.getWidth..
Getting frames from Video Image in Android http://stackoverflow.com/questions/1893072/getting-frames-from-video-image-in-android argb8888 data camSize.width camSize.height Bitmap bitmap Bitmap.createBitmap argb8888 camSize.width camSize.height Config.ARGB_8888 ... decode Y U and V values on the YUV 420 buffer described as YCbCr_422_SP by Android David Manpearl 081201 public void..
How to make an ImageView to have rounded corners http://stackoverflow.com/questions/2459916/how-to-make-an-imageview-to-have-rounded-corners getRoundedCornerBitmap Bitmap bitmap int pixels Bitmap output Bitmap.createBitmap bitmap.getWidth bitmap .getHeight Config.ARGB_8888 Canvas canvas new Canvas output final int color 0xff424242 final Paint paint new Paint final Rect rect new Rect 0 0 bitmap.getWidth..
How to draw a smooth/dithered gradient on a canvas in Android http://stackoverflow.com/questions/2936803/how-to-draw-a-smooth-dithered-gradient-on-a-canvas-in-android
Android: How to get a custom view to redraw partially? http://stackoverflow.com/questions/2949036/android-how-to-get-a-custom-view-to-redraw-partially void onDraw Canvas canvas if initialDrawingIsPerformed this.cachedBitmap Bitmap.createBitmap getWidth getHeight Config.ARGB_8888 Change to lower bitmap config if possible. Canvas cacheCanvas new Canvas this.cachedBitmap doInitialDrawing cacheCanvas..
BitmapFactory.decodeResource returns a mutable Bitmap in Android 2.2 and an immutable Bitmap in Android 1.6 http://stackoverflow.com/questions/4349075/bitmapfactory-decoderesource-returns-a-mutable-bitmap-in-android-2-2-and-an-immu Config type imgIn.getConfig Copy the byte to the file Assume source bitmap loaded using options.inPreferredConfig Config.ARGB_8888 FileChannel channel randomAccessFile.getChannel MappedByteBuffer map channel.map MapMode.READ_WRITE 0 imgIn.getRowBytes..
Make certain area of bitmap transparent on touch http://stackoverflow.com/questions/5368774/make-certain-area-of-bitmap-transparent-on-touch getResources R.drawable.over overlay BitmapFactory.decodeResource getResources R.drawable.over .copy Config.ARGB_8888 true c2 new Canvas overlay pTouch new Paint Paint.ANTI_ALIAS_FLAG pTouch.setXfermode new PorterDuffXfermode Mode.SRC_OUT..
Capture picture from android webview http://stackoverflow.com/questions/7702565/capture-picture-from-android-webview pictureDrawable Bitmap bitmap Bitmap.createBitmap pictureDrawable.getIntrinsicWidth pictureDrawable.getIntrinsicHeight Config.ARGB_8888 Canvas canvas new Canvas bitmap canvas.drawPicture pictureDrawable.getPicture return bitmap Disclaimer I haven't actually..
Android: How to do this framing paint? http://stackoverflow.com/questions/9748206/android-how-to-do-this-framing-paint getResources R.drawable.empty Bitmap colored Bitmap.createBitmap mask.getWidth mask.getHeight Config.ARGB_8888 Canvas cv new Canvas colored cv.drawBitmap original 0 0 null for int x 0 x mask.getWidth x for int y 0 y mask.getHeight..
photo/image-to-sketch algorithm http://stackoverflow.com/questions/9826273/photo-image-to-sketch-algorithm the color dodge blend mode to it. public Bitmap ColorDodgeBlend Bitmap source Bitmap layer Bitmap base source.copy Config.ARGB_8888 true Bitmap blend layer.copy Config.ARGB_8888 false IntBuffer buffBase IntBuffer.allocate base.getWidth base.getHeight base.copyPixelsToBuffer.. ColorDodgeBlend Bitmap source Bitmap layer Bitmap base source.copy Config.ARGB_8888 true Bitmap blend layer.copy Config.ARGB_8888 false IntBuffer buffBase IntBuffer.allocate base.getWidth base.getHeight base.copyPixelsToBuffer buffBase buffBase.rewind..
Carousel library for android http://stackoverflow.com/questions/9838518/carousel-library-for-android matrix false final Bitmap bitmapWithReflection Bitmap.createBitmap width int height height imageReflectionRatio Config.ARGB_8888 final Canvas canvas new Canvas bitmapWithReflection canvas.drawBitmap sepia 0 0 null final Paint deafaultPaint new Paint.. width bmpOriginal.getWidth int depth 20 Bitmap bmpSephia Bitmap.createBitmap width height Bitmap.Config.ARGB_8888 Canvas canvas new Canvas bmpSephia Paint paint new Paint ColorMatrix cm new ColorMatrix cm.setScale .3f .3f .3f 1.0f ColorMatrixColorFilter.. final ColorMatrixColorFilter colorFilter new ColorMatrixColorFilter bwMatrix Bitmap rBitmap sampleBitmap.copy Bitmap.Config.ARGB_8888 true Paint paint new Paint paint.setColorFilter colorFilter Canvas myCanvas new Canvas rBitmap myCanvas.drawBitmap rBitmap..
|