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; /*w ww .java 2 s . co m*/ import android.graphics.Bitmap; import android.os.AsyncTask; public class FilterTask extends AsyncTask<Filter, Void, Bitmap> { Filter filter; @Override protected Bitmap doInBackground(Filter... args) { if (args.length != 1 || args[0] == null) throw new IllegalArgumentException( "Background task requires a Filter parameter"); filter = args[0]; return filter.apply(); } @Override protected void onPostExecute(Bitmap bitmap) { if (filter.getFilterListener() != null) filter.getFilterListener().onFilterDone(filter, bitmap); } }