Android.graphics.BitmapFactory
lastmod 2026-11-10created 2016-05-272 edits
android.graphics.BitmapFactory is an Android class that reads images from various sources, such as files, byte arrays, streams, and resources, and turns them into Bitmap objects. It provides static methods such as decodeFile, decodeResource, decodeStream, and decodeByteArray, and each method also accepts a BitmapFactory.Options so you can check the size or decode at a reduced scale. To save memory, it is recommended to decode at a reduced size that matches the display size.