Android - Image Effects Tutorial
Android allows you to manipulate images by adding different kinds of effects on the images. You can easily apply image processing techniques to add certain kinds of effects on images. The effects could be brightness,darkness, grayscale conversion e.t.c. Android provides Bitmap class to handle images. This can be found under android.graphics.bitmap. There are many ways through which you can instantiate bitmap. We are creating a bitmap of image from the imageView. private Bitmap bmp ; private ImageView img ; img = ( ImageView ) findViewById ( R . id . imageView1 ); BitmapDrawable abmp = ( BitmapDrawable ) img . getDrawable (); Now we will create bitmap by calling getBitmap() function of BitmapDrawable class. Its syntax is given below − bmp = abmp . getBitmap (); An image is nothing but a two dimensional matrix. Same way you will handle a bitmap. An image consist of pixels. So you will get pixels from this bitmap and apply processing to it. Its syntax is as follows −...