I am trying to apply effect (sepia, brightness, bloom and other image effects if API for them is available) on an image for my android app. But I am totally unable to get precise and well mannered code or concept for solving such problem. Although Android 4.0 (API 14) have build in android.media.effect api in it but I am working in Android 2.1 which have only Bitmap, Drawable, DrawableBitmap e.t.c but i am not getting which to work with.
In Photos, tap a photo to view it in full screen. Tap Edit, then tap the cropping tool at the bottom right of the screen. Swipe left under the photo to view the effects you can edit: Straighten, Vertical or Horizontal. Tap the effect you want to edit, then drag the slider to make precise adjustments.
Displays image resources, for example Bitmap or Drawable resources. ImageView is also commonly used to apply tints to an image and handle image scaling.
A bitmap is simply a rectangle of pixels. Each pixel can be set to a given color but exactly what color depends on the type of the pixel. The first two parameters give the width and the height in pixels. The third parameter specifies the type of pixel you want to use.
I have written lots of image effects here, you can try: http://xjaphx.wordpress.com/learning/tutorials/
Note: the tutorials are meant to explain how image effect algorithms are implemented in the most simple way, it's not recommended for production usage.
As for Pete Answer I tried all of the classes he made and I'm sorry to be a party pooper but these classes are very slow it took at least 10 sec to process an Image with them. in my case I needed to process 5 images before the user can proceed with the flow.
after a few hours I came across this excellent library,(super easy to integrate with gradle):
https://github.com/wasabeef/picasso-transformations
this is an example of how to use it:
Transformation trans1 = new ContrastFilterTransformation(getActivity(), 1.5f);
Transformation trans2 = new BrightnessFilterTransformation(getActivity(), 0.2f);
Picasso.with(getActivity()).load(uri)
.transform(trans1).transform(trans2).into(imageview3);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With