zoukankan      html  css  js  c++  java
  • andrlid 处理大图片思路,未实践

    Loading Large Bitmaps Efficiently

    先不解码,读取image的宽高,然后降采样显示图片。
     

    参考:http://developer.android.com/training/displaying-bitmaps/load-bitmap.html

    Images come in all shapes and sizes. In many cases they are larger than required for a typical application user interface (UI). For example, the system Gallery application displays photos taken using your Android devices's camera which are typically much higher resolution than the screen density of your device.

    Given that you are working with limited memory, ideally you only want to load a lower resolution version in memory. The lower resolution version should match the size of the UI component that displays it. An image with a higher resolution does not provide any visible benefit, but still takes up precious memory and incurs additional performance overhead due to additional on the fly scaling.

    This lesson walks you through decoding large bitmaps without exceeding the per application memory limit by loading a smaller subsampled version in memory.

    看stackover flow上一个帖子,也是这个思路:

    http://stackoverflow.com/questions/477572/strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object/823966#823966

  • 相关阅读:
    windows x64 软件约定
    windows 64位 系统非HOOK方式监控进程创建
    win 64 ring0 inline hook
    win 64 Shadow ssdt hook
    win 64 SSDT HOOK
    win 64 文件操作
    win64 驱动内存基本操作
    windbg符号表问题
    Windows 64位驱动编程基础与win64 ssdt
    基础知识
  • 原文地址:https://www.cnblogs.com/stevenlxq/p/3405872.html
Copyright © 2011-2022 走看看