O Omar Member Licensed User Longtime User Aug 2, 2011 #1 Hello, Is there any way to convert an image retrieved as: android.graphics.drawable.Drawable to Bitmap. Thanks.
Hello, Is there any way to convert an image retrieved as: android.graphics.drawable.Drawable to Bitmap. Thanks.
Erel B4X founder Staff member Licensed User Longtime User Aug 2, 2011 #2 If the Drawable is a BitmapDrawable then you can assign it to a BitmapDrawable object and then access the internal bitmap. Your other option is to create a new mutable bitmap and draw the drawable on this bitmap with Canvas.DrawDrawable. Upvote 0
If the Drawable is a BitmapDrawable then you can assign it to a BitmapDrawable object and then access the internal bitmap. Your other option is to create a new mutable bitmap and draw the drawable on this bitmap with Canvas.DrawDrawable.
O Omar Member Licensed User Longtime User Aug 2, 2011 #3 Thank you very much Erel. I will try that. Edit: Worked like a charm. Thanks again Erel ! Last edited: Aug 2, 2011 Upvote 0