Back to project page ion.
The source code is released under:
Apache License
If you think the Android project ion 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 com.koushikdutta.ion; //from w w w. j ava 2s.c om import android.graphics.Bitmap; import com.koushikdutta.async.future.TransformFuture; import com.koushikdutta.ion.bitmap.BitmapInfo; class BitmapInfoToBitmap extends TransformFuture<Bitmap, BitmapInfo> { ContextReference contextReference; public BitmapInfoToBitmap(ContextReference contextReference) { this.contextReference = contextReference; } @Override protected void transform(BitmapInfo result) throws Exception { if (contextReference.isAlive() != null) { cancel(); return; } if (result.exception != null) setComplete(result.exception); else setComplete(result.bitmap); } }