Back to project page android-imgpro-lib.
The source code is released under:
MIT License
If you think the Android project android-imgpro-lib listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.akhyar.android.imgpro.filters; /*from w w w .ja v a2s.c o m*/ import net.akhyar.android.imgpro.Filter; import net.akhyar.android.imgpro.ImgPro; import net.akhyar.android.imgpro.actions.Blend; import net.akhyar.android.imgpro.actions.Contrast; import android.graphics.Bitmap; public class Vintage extends Filter { public void onBitmapSet(Bitmap bitmap) { int size = bitmap.getWidth() * bitmap.getHeight(); int[] blue = ImgPro.createSolidPixels(0xff002288, size); int[] yellow = ImgPro.createSolidPixels(0xffFFFB00, size); clearActions(); addAction(new Contrast(50)); addAction(new Blend(blue, 0.8f, Blend.Mode.LIGHTEN)); addAction(new Blend(yellow, 0.1f, Blend.Mode.SOFT_LIGHT)); } @Override public String getName() { return "Vintage"; } }