Download the demo app on Google Play.
This project demonstrate how to use HandlerThread
s and ThreadPool
s to burst capture
images from Android's Camera API on a background thread.
The images are then:
- Converted from YUV
byte[]
to RGBint[]
. - Converted from RGB
int[]
toBitmap
. - Bitmap is rotated if needed to fix orientation.
- A Thumbnail size Bitmap is made for displaying.
- Full size bitmap is written to disk as a Jpeg.
- Jpeg image is uploaded to a server.
The CameraPreview YUV byte[]
is captured on a background HandlerThread
and then
ThreadPools are used to perform the operations above to improve speed and performance.
Download the demo app on Google Play.