![]() Now it is time to calculate inSampleSize. And I just wanted to see if bitmap is really null. When we run this code and log options value: options.outHeight : 1126 options.outWidth : 2000 options.bitmap : null So we can calculate scale factor with that information. We just want to get information(width, height, etc.) about image. What is the meaning of inJustDecodeBounds? It means that we don’t want to load bitmap into memory. ![]() You can see that we configured our “options” by setting inJustDecodeBounds true. We pass BitmapFactory.Options instance to codeSource() method. BitmapFactory.Options options = new BitmapFactory.Options() options.inJustDecodeBounds = true BitmapFactory. We can use this class to achieve first step. This class is a metadata provider for us.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |