How can i work with Android EffectFactory Class?


Answers

You can find the official sample project HelloEffects in android-sdk-windows\samples\android-17

Question

I tired to Develop a sample application with image processing, in my app i need to add some color effects (Grayscale, sepia) over my bitmap i referred the developer documents Doc 1 and Doc 2, in this document there is no practical examples, so need to know whether we can add Vintage,Sepia color effects using this class, any one guide me please, Thanks in advance.

Update:

I tried like this,

private EffectContext mEffectContext;

Bitmap b1 = BitmapFactory.decodeResource(getResources(),
                        R.drawable.sample);
EffectFactory effectFactory = mEffectContext.getFactory();
                Effect mEffect = effectFactory
                        .createEffect(EffectFactory.EFFECT_SEPIA);

Now how can i set the mEffect to my bitmap?





Tags