Home » Android » android – get bitmap from bitmapdescriptor

android – get bitmap from bitmapdescriptor

Posted by: admin May 14, 2020 Leave a comment


Is it possible to get a Bitmap from BitmapDescriptor?

I’m trying to use googles api’s to make my app more seemless but I could make custom Marker option objects instead… I would think that BitmapDescriptor would extend FileDescriptor but I don’t see that.

How to&Answers:

All the BitmapDescriptors come from the BitmapDescriptorFactory.

Example custom marker from imageId in MediaStore.

final BitmapFactory.Options bmOptions = new BitmapFactory.Options();
            bmOptions.inSampleSize = 8;  //about the size of standard marker

Bitmap bm = MediaStore.Images.Thumbnails.getThumbnail(
                            context.getContentResolver(), newImageId,
                    if (bm != null) {
                        BitmapDescriptor bd = BitmapDescriptorFactory
                        if (bd != null) {