android - Standard image gallery app -


I am trying to write simple applications where I can swipe between photos (such as the standard gallery on each device App). The standard shows an impressive performance - it only displays the next photo at the next 15MB memory time, it seems that it keeps the next and previous images in memory, so they do not delay due to loading from SD-card it happens. I suppose that if the app keeps such size items in at least 3 bitmap memory, then it will take more than 15 MB. So how does it work? Do not use bitmap or what? Thank you.

Remember that the bitmap on the screen is not the size of your original file.

Take a 720p screen for example, a 4096 * 3072 photo will be decoded and will be resized for the size of the screen.

Even the APP may also be using ARGB8888 format to display a bitmap memory size of 1280 * 720 * 4 = 3686400 bytes, which is about 3.5 m.

And if we use the RGB 565 format, the size will be half-truncated.

What's more, the whole picture is not 'full screen'.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -