Android library to easily pick an image from gallery or camera app. The users can select their prefered gallery/camera app on a unique Intent. Initial gist:
When your goal in image picking isn't to display the image immediately, but to do something with it (e.g. upload somewhere), there's no need to use up all the memory for loading an image file into a Bitmap instance.
This is especially true as many APIs allow streaming access precisely to avoid huge memory overhead.
This addition returns an InputStream instead of a Bitmap (but is otherwise functionally equivalent). InputStream is what you can get from ContentResolver for e.g. gallery access, and from the temporary file written by the camera access, so makes for the best interface here.
When your goal in image picking isn't to display the image immediately, but to do something with it (e.g. upload somewhere), there's no need to use up all the memory for loading an image file into a Bitmap instance.
This is especially true as many APIs allow streaming access precisely to avoid huge memory overhead.
This addition returns an InputStream instead of a Bitmap (but is otherwise functionally equivalent). InputStream is what you can get from ContentResolver for e.g. gallery access, and from the temporary file written by the camera access, so makes for the best interface here.