If you are looking for a way to implement a camera function AND compress it before you either push it to your database or save it to your internal storage. This is my way of solving that issue.
If you have a better/improved solution, feel free to pull and patch!
Meanwhile, enjoy your compressed bitmap!