I'm an noob in Android and new here .
I just know that Bitmap store images pixel by pixel and don't do any compress .
Is Drawable same as Bitmap ?
or
For the same image file , a Drawable is takes less memory then a Bitmap ?
Thanks for any response .
A bitmap is a Drawable
. A Drawable
is not necessarily a bitmap. Like all thumbs are fingers but not all fingers are thumbs.
The API dictates:
Though usually not visible to the application, Drawables may take a variety of forms:
- Bitmap: the simplest Drawable, a PNG or JPEG image.
- Nine Patch: an extension to the PNG format allows it to specify information about how to stretch it and place things inside of it.
- Shape: contains simple drawing commands instead of a raw bitmap, allowing it to resize better in some cases.
- Layers: a compound drawable, which draws multiple underlying drawables on top of each other.
- States: a compound drawable that selects one of a set of drawables based on its state.
- Levels: a compound drawable that selects one of a set of drawables based on its level.
- Scale: a compound drawable with a single child drawable, whose overall size is modified based on the current level.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With