Image loading method and device
A picture loading and picture technology, applied in the field of picture processing, can solve the problems of easy triggering of OOM and large Java heap memory pressure, and achieve the effect of reducing trigger probability, reducing pressure, and improving picture loading efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0022] Embodiment 1 of the present application provides a picture loading method, which is applicable to any client or terminal device based on the Android system, without limitation. Specifically, such as figure 1 As shown, the picture loading method may include the following steps:
[0023] Step 101: When loading a picture, judge whether the decoded data of the picture is cached in the Native heap memory, if the judgment result is yes, execute step 102, otherwise, execute step 103.
[0024] Optionally, the decoded data of the picture is usually the pixel array data of the Bitmap object obtained by decoding the picture. In addition, because in the embodiment described in this application, for any picture, when the decoded data of the picture is cached in the Native heap memory, a corresponding Record data, therefore, to determine whether the decoded data of the picture is cached in the Native heap memory, the execution can be as follows:
[0025] Judging whether the record...
Embodiment 2
[0058] Based on the same inventive concept as the image loading method in Embodiment 1 of the present application, Embodiment 2 of the present application provides an image loading device. For the specific implementation of the image loading device, please refer to the relevant description in Embodiment 1 of the above-mentioned method. Repeated parts will not be repeated, specifically, such as image 3 As shown, the picture loading device may include:
[0059] The judging unit 31 can be used to judge whether the decoded data of the picture is cached in the Native heap memory when the picture is loaded;
[0060] The execution unit 32 can be used to obtain the decoded data of the picture from the Native heap memory if it is determined that the decoded data of the picture is cached in the Native heap memory, and realize the loading of the picture based on the obtained decoded data; otherwise, from the storage Acquire and load the picture from the storage space of the picture, an...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com