CN107193887A - A kind of method and device for the resource that Loads Image - Google Patents

A kind of method and device for the resource that Loads Image Download PDF

Info

Publication number
CN107193887A
CN107193887A CN201710296195.2A CN201710296195A CN107193887A CN 107193887 A CN107193887 A CN 107193887A CN 201710296195 A CN201710296195 A CN 201710296195A CN 107193887 A CN107193887 A CN 107193887A
Authority
CN
China
Prior art keywords
picture
loaded
spatial cache
amount
interception
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710296195.2A
Other languages
Chinese (zh)
Other versions
CN107193887B (en
Inventor
张磊
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yami Technology Guangzhou Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710296195.2A priority Critical patent/CN107193887B/en
Publication of CN107193887A publication Critical patent/CN107193887A/en
Priority to PCT/CN2018/082165 priority patent/WO2018196582A1/en
Application granted granted Critical
Publication of CN107193887B publication Critical patent/CN107193887B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Digital Computer Display Output (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a kind of method and device for the resource that Loads Image, methods described includes:Obtain the size and screen size of picture to be loaded;System spare amount of ram and memory amount are obtained, spatial cache is determined according to the free memory amount and memory amount;The picture to be loaded is intercepted according to the capacity of the spatial cache, and the current information of the picture to be loaded after interception is loaded onto in the spatial cache;The current sliding point of finger on the screen is obtained, when it is determined that the current sliding point is more than the border of the picture to be loaded after interception, the remaining information of the picture to be loaded is loaded onto in the spatial cache by first nodal point of current sliding point;In this way, picture to be loaded so is loaded onto into spatial cache by way of burst is loaded, efficiently solve causes the problem of internal memory overflows because super large picture internal memory is excessive.

Description

A kind of method and device for the resource that Loads Image
Technical field
The invention belongs to picture Processing Technique field, more particularly to a kind of method and device for the resource that Loads Image.
Background technology
During Android is developed, almost all of application all be unable to do without the loading of picture.
In the prior art, usually picture is loaded directly into internal memory and then got again from internal memory the information exhibition of picture Show on screen, this method is possible for smaller picture.But if go loading one big according to the method described above Picture, the picture size in internal memory can exceed the total size of heap memory, cause system can not disposably distribute so many internal memories, And then cause internal memory spilling occur.
Based on this, the present invention provides a kind of method and device for the resource that Loads Image, of the prior art above-mentioned to solve Problem.
The content of the invention
The problem of existing for prior art, the embodiments of the invention provide a kind of method of resource that Loads Image and dress Put, for solving in the prior art when loading the picture of big internal memory, because the picture size in internal memory can exceed heap memory Space, the technical problem for causing internal memory to overflow.
The present invention provides a kind of method for the resource that Loads Image, and methods described includes:
Obtain the size of picture to be loaded;
System spare amount of ram and memory amount are obtained, determines to cache according to the free memory amount and the memory amount Space;
The picture to be loaded is intercepted according to the capacity of the spatial cache, and by the picture to be loaded after interception Current information is loaded onto in the spatial cache;
The current sliding point of finger on the screen is obtained, described in after it is determined that the current sliding point is beyond interception During the border of picture to be loaded, the remaining information of the picture to be loaded is loaded by first nodal point of the current sliding point Into the spatial cache.
It is described that spatial cache is determined according to the free memory amount and memory amount in such scheme, including:
The surplus ratio of the internal memory is determined according to the free memory amount and memory amount;
Obtain screen size, the amount of ram according to needed for the screen size determines full frame interface;
The spatial cache C is determined according to formula C=B/A;Wherein, the A is the surplus ratio, and the B is full frame boundary Amount of ram needed for face.
It is described that the picture to be loaded is intercepted according to the capacity of the spatial cache in such scheme, including:
The center of the picture to be loaded is determined, the center is set to the second central point;
The first interception area and the ratio of width to height of the picture to be loaded are determined according to screen size;
Centered on second central point, utilized based on first interception area and described the ratio of width to height and intercept algorithm DecodeRegion is intercepted to the picture to be loaded.
In such scheme, after the picture to be loaded after interception is loaded onto in the spatial cache, in addition to:Loading After the completion of return to the first bitmap to picture, by first bitmap to as being arranged in display background, showing the picture to be loaded Current information.
In such scheme, after the remaining information that the picture to be loaded is loaded by first nodal point of current sliding point, also Including:The second bitmap is returned to after the completion of loading to picture, by second bitmap to as being arranged in display background, refreshing and showing The remaining information of the picture to be loaded.
The present invention also provides a kind of device for the resource that Loads Image, and described device includes:
Acquiring unit, for obtaining size, system spare amount of ram and the memory amount and finger of picture to be loaded in institute State the current sliding point on screen;
Determining unit, for determining spatial cache according to the free memory amount and the memory amount;
Loading unit, for intercepting the picture to be loaded according to the capacity of the spatial cache, and by the institute after interception The current information for stating picture to be loaded is loaded onto in the spatial cache;
When it is determined that the current sliding point beyond interception after the picture to be loaded border when, work as front slide with described The remaining information of the picture to be loaded is loaded onto in the spatial cache by point for first nodal point.
In such scheme, the acquiring unit is additionally operable to:Obtain screen size;The determining unit specifically for:
The surplus ratio of the internal memory is determined according to the free memory amount and the memory amount;
Amount of ram according to needed for the screen size determines full frame interface;
The spatial cache C is determined according to formula C=B/A;Wherein, the A is the surplus ratio, and the B is full frame boundary Amount of ram needed for face.
In such scheme, the loading unit specifically for:
The center of the picture to be loaded is determined, the center is set to the second central point;
The first interception area and the ratio of width to height of the picture to be loaded are determined according to screen size;
Centered on second central point, utilized based on first interception area and described the ratio of width to height and intercept algorithm DecodeRegion is intercepted to the picture to be loaded.
In such scheme, described device also includes:Display unit, the display unit is used for will be described to be added after interception After load picture is loaded onto in the spatial cache, the first bitmap is returned to picture, by first bitmap to as being arranged on the display back of the body Jing Zhong, shows the current information of the picture to be loaded.
In such scheme, display unit is additionally operable to:The picture to be loaded is loaded by first nodal point of current sliding point Remaining information after return to the second bitmap to picture, by second bitmap to as being arranged in display background, refreshing and showing institute State the remaining information of picture to be loaded.
The invention provides a kind of method and device for the resource that Loads Image, methods described includes:Obtain picture to be loaded Size;System spare amount of ram and memory amount are obtained, spatial cache is determined according to the free memory amount and memory amount; The picture to be loaded is intercepted according to the capacity of the spatial cache, and by the current information of the picture to be loaded after interception It is loaded onto in the spatial cache;The current sliding point of finger on the screen is obtained, when it is determined that the current sliding point is big When the border of the picture to be loaded after interception, by first nodal point of the current sliding point by the picture to be loaded Remaining information be loaded onto in the spatial cache;In this way, determining that one is delayed according to the free memory amount and memory amount Space is deposited, first a part for pictorial information to be loaded is loaded according to the capacity of spatial cache;When finger slides into interception During the border of picture to be loaded afterwards, then so led to according to the remainder of the incremental assignment pictorial information of spatial cache again Picture to be loaded is loaded onto spatial cache by the mode for crossing burst loading, is efficiently solved in causing because super large picture internal memory is excessive The problem of depositing spilling.
Brief description of the drawings
Fig. 1 is the method flow schematic diagram for the resource that Loads Image that the embodiment of the present invention one is provided;
Fig. 2 is the apparatus structure schematic diagram for the resource that Loads Image that the embodiment of the present invention one is provided.
Embodiment
In order to when loading super large picture, it is to avoid appearance causes the problem of internal memory overflows because picture internal memory is excessive, the present invention There is provided a kind of method and device for the resource that Loads Image, methods described includes:Obtain the size and screen chi of picture to be loaded It is very little;System spare amount of ram and memory amount are obtained, spatial cache is determined according to the free memory amount and memory amount;According to The capacity of the spatial cache intercepts the picture to be loaded, and the current information of the picture to be loaded after interception is loaded Into the spatial cache;Finger current sliding point on the screen is obtained, when it is determined that the current sliding point is beyond cutting During the border of the picture to be loaded after taking, by first nodal point of the current sliding point by the surplus of the picture to be loaded Remaining information is loaded onto in the spatial cache.
Technical scheme is described in further detail below by drawings and the specific embodiments.
Embodiment one
The present embodiment provides a kind of method for the resource that Loads Image, as shown in figure 1, methods described includes:
S101, obtains the size of picture to be loaded.
In this step, the screen size for getting the original size of picture to be loaded and display picture to be loaded is needed first, The screen can be the screen for any intelligent terminal for being provided with Android system, such as:Smart mobile phone, flat board and wearable device Deng.The picture to be loaded is usually the picture of very large memory, and the internal memory of the picture to be loaded is at least over 20M.
Here, the composition of the picture file is generally all made up of head description information and actual content information.That , specifically can be as follows when obtaining the size of picture to be loaded:
The type of the picture is determined by reading the suffix name of picture to be loaded first, the type is then based on and calls BitmapFactory.decodeStream methods obtain the header information of picture, and header information storage is arrived In BitmapFactory.Options objects.It is last called respectively from BitmapFactory.Options outWidth and OutHeight methods, to have got the width and height of picture respectively.Describe the width of the picture of acquisition for convenience here It is labeled as picWidth, high mark.
Get after the original size of picture, also need to obtain the screen size of display picture to be loaded, with energy below scheme The size that the screen can show is determined during processing picture.
The context Context provided particular by calling system calls getSystemService methods to get The window management class WindowManager of system.GetWidth () method in by window management class obtains current screen Width, the elevation information of current screen is got using getHeight () method.For convenience, by the width marker of screen For screenWidth, it is and screenHeight by the number of altitude.
S102, obtains system spare amount of ram and memory amount, true according to the free memory amount and the memory amount Determine spatial cache.
Get after the original size and screen size of picture to be loaded, also need to get system spare amount of ram and described Memory amount;Here, it is to call getSystemService methods to get the boundary of system by system context Context Facial canal reason object ActivityManager.Then obtained by interface management object reference getMemoryInfo objects therein Get the descriptor memory object memoryInfo in system.Then availMem methods are called to obtain from memoryInfo objects again Get the free memory amount of the system;The memory amount of system is got using totalMem methods.Describe for convenience, will Free memory amount is labeled as availMem, and memory amount is labeled as into totalMem.
Get after free memory amount and memory amount, determine that one is delayed further according to the free memory amount and memory amount Deposit space.
Specifically, the surplus ratio A of the internal memory is determined according to the free memory amount and memory amount, such as formula (1) institute Show:
A=availMem/totalMem (1)
In formula (1), the availMem is internal memory surplus, and the totalMem is memory amount.
Shown in amount of ram according to needed for the screen size determines full frame interface, such as formula (2):
B=screenWidth*screenHeight (2)
In formula (2), the screenWidth is the width information of the screen, and the screenHeight is described The elevation information of screen.
The spatial cache C is determined according to formula (3);
C=B/A (3)
Wherein, in formula (3), the A is the surplus ratio, and the B is the amount of ram needed for full frame interface.
The capacity of spatial cache is thus calculated, it is necessary to which explanation, the capacity of spatial cache is surplus according to internal memory What surplus was dynamically adjusted, internal memory surplus is bigger, and the capacity of spatial cache is bigger;Internal memory surplus is smaller, spatial cache Capacity is smaller.
S103, the picture to be loaded is intercepted according to the capacity of the spatial cache, and will be described to be loaded after interception The current information of picture is loaded onto in the spatial cache.
In this step, after the capacity for determining spatial cache, intercepted according to the capacity of the spatial cache described to be loaded Picture, and the current information of the picture to be loaded after interception is loaded onto in the spatial cache.
Specifically, it is first determined the center of the picture to be loaded, the center is set to the second center Point;Second central point is picWidth/2 and picHeight/2 point of intersection.
Then the first interception area and the ratio of width to height of the picture to be loaded are determined according to the screen size;It is described wide high Than that should be consistent with the ratio of width to height of the screen.
Finally centered on second central point, calculated based on first interception area and described the ratio of width to height using interception Method decodeRegion is intercepted to the picture to be loaded.After being intercepted to the picture to be loaded, by working as after interception Preceding information is loaded onto in the spatial cache, the first bitmap is returned to after the completion of loading to picture, by first bitmap to picture BitMap is arranged in display background, can show the current information of the picture to be loaded.
So, a part of information of picture to be loaded can be just shown on screen.
S104, obtains the current sliding point of finger on the screen, after it is determined that the current sliding point is beyond interception The picture to be loaded border when, by first nodal point of the current sliding point by the picture to be loaded residue believe Breath is loaded onto in the spatial cache.
In this step, when there is gesture to slide the remaining information to check picture to be loaded on screen, it is by monitoring The slip event of system obtains the current sliding point of finger on the screen, when it is determined that the current sliding point is cut beyond described During the border of the picture to be loaded after taking, with current sliding point, (i.e. the friendship on screen is pressed in the boundary line of spatial cache with finger Point) remaining information of the picture to be loaded is loaded onto in the spatial cache for first nodal point, it will can thus treat The remaining information Loaded Image is loaded onto in spatial cache.
The second bitmap is returned to after the completion of loading to picture, by second bitmap to as being arranged in display background, refreshing simultaneously Show the remaining information of the picture to be loaded.Picture to be loaded is so loaded by way of burst is loaded it is avoided that occurring The problem of internal memory overflows, and the method that this local loading is shown also avoided the occurrence of due to when the mode of lossy compression method is loaded The problem of causing picture.
Here, specifically by invalidate methods the remaining the picture to be loaded of spatial cache of calling system Remaining information refreshes to screen.
Embodiment two
Corresponding to embodiment one, the present embodiment provides a kind of device for the resource that Loads Image, as shown in Fig. 2 described device Including:Acquiring unit 21, determining unit 22, loading unit 23 and display unit 24;Wherein,
The acquiring unit 21 need to get the original size of picture to be loaded and the screen size of display picture to be loaded, The screen can be the screen for any intelligent terminal for being provided with Android system, such as:Smart mobile phone, flat board and wearable device Deng.The picture to be loaded is usually the picture of very large memory, and the internal memory of the picture to be loaded is at least over 20M.
Here, the composition of the picture file is generally all made up of head description information and actual content information.That , specifically can be as follows when obtaining the size of picture to be loaded:
The acquiring unit 21 determines the type of the picture by reading the suffix name of picture to be loaded first, is then based on The type calls BitmapFactory.decodeStream methods to obtain the header information of picture, and header information is stored Into BitmapFactory.Options objects.It is last called respectively from BitmapFactory.Options outWidth and OutHeight methods, to have got the width and height of picture respectively.Describe the width of the picture of acquisition for convenience here It is labeled as picWidth, high mark.
Get after the original size of picture, the acquiring unit 21 also needs to obtain the screen chi of display picture to be loaded It is very little, so that the size that the screen can show can be determined during below scheme processing picture.
The context Context that the acquiring unit 21 is provided particular by calling system is called GetSystemService methods get the window management class WindowManager of system.In by window management class GetWidth () method obtains the width of current screen, and the height letter of current screen is got using getHeight () method Breath.For convenience, it is screenWidth by the width marker of screen, is and screenHeight by the number of altitude.
The acquiring unit 21 is got after the original size and screen size of picture to be loaded, is also needed to get system and is remained Remaining amount of ram and memory amount;Here, it is to call getSystemService methods to obtain by system context Context To the interface management object ActivityManager of system.Then it is therein by interface management object reference GetMemoryInfo objects get the descriptor memory object memoryInfo in system.Then again from memoryInfo pairs AvailMem methods are called to get the free memory amount of the system as in;Got using totalMem methods in system Deposit total amount.Describe for convenience, free memory amount is labeled as availMem, memory amount is labeled as totalMem.
The acquiring unit 21 is got after free memory amount and memory amount, and the determining unit 22 is used for according to described Free memory amount and memory amount determine a spatial cache.
Specifically, the surplus ratio A of the internal memory is determined according to the free memory amount and memory amount, such as formula (1) institute Show:
A=availMem/totalMem (1)
In formula (1), the availMem is internal memory surplus, and the totalMem is memory amount.
Shown in amount of ram according to needed for the screen size determines full frame interface, such as formula (2):
B=screenWidth*screenHeight (2)
In formula (2), the screenWidth is the width information of the screen, and the screenHeight is described The elevation information of screen.
The spatial cache C is determined according to formula (3);
C=B/A (3)
Wherein, in formula (3), the A is the surplus ratio, and the B is the amount of ram needed for full frame interface.
So described determining unit 22 just calculates the capacity of spatial cache, it is necessary to explanation, the appearance of spatial cache Amount is dynamically adjusted according to internal memory surplus, and internal memory surplus is bigger, and the capacity of spatial cache is bigger;Internal memory surplus is got over Small, the capacity of spatial cache is smaller.
After the capacity for determining spatial cache, the loading unit 23 is treated according to being intercepted the capacity of the spatial cache Load Image, and the current information of the picture to be loaded after interception is loaded onto in the spatial cache.
Specifically, loading unit 23 described first determines the center of the picture to be loaded, by the center It is set to the second central point;Second central point is picWidth/2 and picHeight/2 point of intersection.
Then the first interception area and the ratio of width to height of the picture to be loaded are determined according to the screen size;It is described wide high Than that should be consistent with the ratio of width to height of the screen.
Finally centered on second central point, calculated based on first interception area and described the ratio of width to height using interception Method decodeRegion is intercepted to the picture to be loaded.After being intercepted to the picture to be loaded, by working as after interception Preceding information is loaded onto in the spatial cache, and the first bitmap is returned after the completion of loading to picture, and the display unit 24 is by described One bitmap as BitMap to being arranged in display background, can show the current information of the picture to be loaded.
So, the display unit 24 can just show a part of information of picture to be loaded on screen.
When there is gesture to slide the remaining information to check picture to be loaded on screen, the loading unit 23 passes through prison The slip event of system is listened to obtain the current sliding point of finger on the screen, when it is determined that the current sliding point beyond cut During the border of the picture to be loaded after taking, with current sliding point, (i.e. the boundary line of spatial cache is pressed on screen with finger Intersection point) remaining information of the picture to be loaded is loaded onto in the spatial cache for first nodal point, thus can be with The remaining information of picture to be loaded is loaded onto in spatial cache.
The loading unit 23 returns to the second bitmap to picture after the completion of loading, and the display unit 24 is by second bitmap To as being arranged in display background, refreshing and showing the remaining information of the picture to be loaded.The side so loaded by burst Formula loads picture to be loaded it is avoided that the problem of internal memory spilling occur, and the method that this local loading is shown also avoids out The problem of having showed due to causing picture when the mode of lossy compression method is loaded.
Here, the display unit 24 specifically by the invalidate methods of calling system by spatial cache The remaining information of picture to be loaded refreshes to screen.
The beneficial effect that the method and device of the resource provided in an embodiment of the present invention that Loads Image can be brought is at least:
The invention provides a kind of method and device for the resource that Loads Image, methods described includes:Obtain picture to be loaded Size;System spare amount of ram and memory amount are obtained, spatial cache is determined according to the free memory amount and memory amount; The picture to be loaded is intercepted according to the capacity of the spatial cache, and by the current information of the picture to be loaded after interception It is loaded onto in the spatial cache;The current sliding point of finger on the screen is obtained, when it is determined that the current sliding point is super During the border of the picture to be loaded gone out after the interception, by first nodal point of current sliding point by the picture to be loaded Remaining information be loaded onto in the spatial cache;In this way, determining that one is delayed according to the free memory amount and memory amount Space is deposited, first a part for pictorial information to be loaded is loaded according to the capacity of spatial cache;When finger slides into interception During the border of the picture to be loaded afterwards, then again according to the remainder of the incremental assignment pictorial information of spatial cache, this Picture to be loaded is loaded onto spatial cache by sample by way of burst is loaded, and is efficiently solved and is led because super large picture internal memory is excessive Cause the problem of internal memory overflows.And carry out burst after burst loading and show that this dynamic local display method is avoided because having Damage compression and reload the picture problem of dtmf distortion DTMF that display is caused.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention, it is all Any modifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the protection of the present invention Within the scope of.

Claims (10)

1. a kind of method for the resource that Loads Image, it is characterised in that methods described includes:
Obtain the size of picture to be loaded;
System spare amount of ram and memory amount are obtained, determines that caching is empty according to the free memory amount and the memory amount Between;
The picture to be loaded is intercepted according to the capacity of the spatial cache, and by the current of the picture to be loaded after interception Information is loaded onto in the spatial cache;
The current sliding point of finger on the screen is obtained, it is described to be added after it is determined that the current sliding point is beyond interception When carrying the border of picture, the remaining information of the picture to be loaded is loaded onto institute by first nodal point of the current sliding point State in spatial cache.
2. the method as described in claim 1, it is characterised in that described to determine to delay according to the free memory amount and memory amount Space is deposited, including:
The surplus ratio of the internal memory is determined according to the free memory amount and memory amount;
Obtain screen size, the amount of ram according to needed for the screen size determines full frame interface;
The spatial cache C is determined according to formula C=B/A;Wherein, the A is the surplus ratio, and the B is full frame interface institute The amount of ram needed.
3. the method as described in claim 1, it is characterised in that described described to be added according to the interception of the capacity of the spatial cache Picture is carried, including:
The center of the picture to be loaded is determined, the center is set to the second central point;
The first interception area and the ratio of width to height of the picture to be loaded are determined according to screen size;
Centered on second central point, utilized based on first interception area and described the ratio of width to height and intercept algorithm DecodeRegion is intercepted to the picture to be loaded.
4. the method as described in claim 1, it is characterised in that the picture to be loaded after interception is loaded onto the caching After in space, in addition to:The first bitmap is returned to after the completion of loading to picture, by first bitmap to as being arranged on display background In, show the current information of the picture to be loaded.
5. the method as described in claim 1, it is characterised in that loaded by first nodal point of current sliding point described to be loaded After the remaining information of picture, in addition to:The second bitmap is returned to after the completion of loading to picture, by second bitmap to aobvious as being arranged on Show in background, refresh and show the remaining information of the picture to be loaded.
6. a kind of device for the resource that Loads Image, it is characterised in that described device includes:
Acquiring unit, for obtaining size, system spare amount of ram and the memory amount and finger of picture to be loaded in the screen Current sliding point on curtain;
Determining unit, for determining spatial cache according to the free memory amount and the memory amount;
Loading unit, for intercepting the picture to be loaded according to the capacity of the spatial cache, and will be treated described in after interception The current information Loaded Image is loaded onto in the spatial cache;
When it is determined that the current sliding point beyond interception after the picture to be loaded border when, using the current sliding point as The remaining information of the picture to be loaded is loaded onto in the spatial cache by first nodal point.
7. device as claimed in claim 6, it is characterised in that the acquiring unit is additionally operable to:Obtain screen size;It is described true Order member specifically for:
The surplus ratio of the internal memory is determined according to the free memory amount and the memory amount;
Amount of ram according to needed for the screen size determines full frame interface;
The spatial cache C is determined according to formula C=B/A;Wherein, the A is the surplus ratio, and the B is full frame interface institute The amount of ram needed.
8. device as claimed in claim 6, it is characterised in that the loading unit specifically for:
The center of the picture to be loaded is determined, the center is set to the second central point;
The first interception area and the ratio of width to height of the picture to be loaded are determined according to screen size;
Centered on second central point, utilized based on first interception area and described the ratio of width to height and intercept algorithm DecodeRegion is intercepted to the picture to be loaded.
9. device as claimed in claim 6, it is characterised in that described device also includes:Display unit, the display unit is used After the picture to be loaded after by interception is loaded onto in the spatial cache, the first bitmap is returned to picture, by described first Bitmap is to as being arranged in display background, showing the current information of the picture to be loaded.
10. device as claimed in claim 6, it is characterised in that display unit is additionally operable to:Using current sliding point as the first center The second bitmap is returned to after the remaining information of the point loading picture to be loaded to picture, by second bitmap to as being arranged on display In background, refresh and show the remaining information of the picture to be loaded.
CN201710296195.2A 2017-04-28 2017-04-28 A kind of method and device for the resource that Loads Image Active CN107193887B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710296195.2A CN107193887B (en) 2017-04-28 2017-04-28 A kind of method and device for the resource that Loads Image
PCT/CN2018/082165 WO2018196582A1 (en) 2017-04-28 2018-04-08 Method and apparatus for loading picture resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710296195.2A CN107193887B (en) 2017-04-28 2017-04-28 A kind of method and device for the resource that Loads Image

Publications (2)

Publication Number Publication Date
CN107193887A true CN107193887A (en) 2017-09-22
CN107193887B CN107193887B (en) 2019-01-29

Family

ID=59872393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710296195.2A Active CN107193887B (en) 2017-04-28 2017-04-28 A kind of method and device for the resource that Loads Image

Country Status (2)

Country Link
CN (1) CN107193887B (en)
WO (1) WO2018196582A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018196582A1 (en) * 2017-04-28 2018-11-01 武汉斗鱼网络科技有限公司 Method and apparatus for loading picture resource
WO2019128357A1 (en) * 2017-12-29 2019-07-04 北京京东尚科信息技术有限公司 Picture requesting method, method for responding to picture request, and client

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043611A (en) * 2009-10-23 2011-05-04 Tcl集团股份有限公司 System for dynamically generating user interface and implementation method thereof
US20130028263A1 (en) * 2011-07-29 2013-01-31 Rajapakse Ravi U Two tier multiple sliding window mechanism for multidestination media applications
CN104731594A (en) * 2015-03-26 2015-06-24 浪潮集团有限公司 Method for displaying runtime customized page based on Bootstrap
CN106502613A (en) * 2016-10-25 2017-03-15 武汉斗鱼网络科技有限公司 A kind of method and device for Loading Image
CN106598523A (en) * 2016-12-16 2017-04-26 北京猎豹移动科技有限公司 Picture loading method, device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI234717B (en) * 2003-12-04 2005-06-21 Inst Information Industry Method and system for dynamically determining web resource to be loaded and saving space
US8949913B1 (en) * 2010-09-16 2015-02-03 Pixia Corp. Method of making a video stream from a plurality of viewports within large format imagery
CN103544207B (en) * 2013-08-19 2019-01-29 Tcl集团股份有限公司 A kind of method and system of picture loaded and displayed
CN103677942B (en) * 2013-12-30 2017-09-05 Tcl集团股份有限公司 A kind of method and apparatus of movable terminal to browse network pictures
CN107193887B (en) * 2017-04-28 2019-01-29 武汉斗鱼网络科技有限公司 A kind of method and device for the resource that Loads Image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043611A (en) * 2009-10-23 2011-05-04 Tcl集团股份有限公司 System for dynamically generating user interface and implementation method thereof
US20130028263A1 (en) * 2011-07-29 2013-01-31 Rajapakse Ravi U Two tier multiple sliding window mechanism for multidestination media applications
CN104731594A (en) * 2015-03-26 2015-06-24 浪潮集团有限公司 Method for displaying runtime customized page based on Bootstrap
CN106502613A (en) * 2016-10-25 2017-03-15 武汉斗鱼网络科技有限公司 A kind of method and device for Loading Image
CN106598523A (en) * 2016-12-16 2017-04-26 北京猎豹移动科技有限公司 Picture loading method, device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018196582A1 (en) * 2017-04-28 2018-11-01 武汉斗鱼网络科技有限公司 Method and apparatus for loading picture resource
WO2019128357A1 (en) * 2017-12-29 2019-07-04 北京京东尚科信息技术有限公司 Picture requesting method, method for responding to picture request, and client
CN109992406A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 The method and client that picture requesting method, response picture are requested
CN109992406B (en) * 2017-12-29 2022-06-07 北京京东尚科信息技术有限公司 Picture request method, picture request response method and client

Also Published As

Publication number Publication date
WO2018196582A1 (en) 2018-11-01
CN107193887B (en) 2019-01-29

Similar Documents

Publication Publication Date Title
US11372528B2 (en) User interface display method, device, and apparatus
CN107193887B (en) A kind of method and device for the resource that Loads Image
CN106156148A (en) The rendering intent of a kind of page, device and terminal device
CN107038194B (en) Page jump method and device
CN105243399B (en) A kind of method and apparatus that realizing image convolution, the method and apparatus for realizing caching
CN106934058A (en) Vector data read method and system, vector data method for visualizing and system
CN105550246A (en) System and method for loading network picture under Android platform
CN111966440A (en) Display control method and device of information flow interface, terminal and storage medium
CN104252350A (en) Method and device for loading picture in listbox
CN105450986B (en) Video processing method under Linux
CN109657017A (en) It polymerize the methods of exhibiting and device of point set in map
CN107608588A (en) Display layer, display methods, display system and operating system
CN103208128B (en) The method and device of display picture
CN103744626B (en) It is a kind of that the method for carrying out data write-in is replaced based on internal memory
CN109190071A (en) Mobile terminal caching method and device
CN106933884A (en) A kind of picture loading method and device
CN105183288B (en) Single-window multi-task display method and intelligent mobile terminal thereof
CN107918643A (en) A kind of Webpage display process and terminal
CN107391148A (en) View elements store method, device, electronic equipment and computer-readable storage medium
CN106020780B (en) Picture loading device and method
CN114332297A (en) Image drawing method and device, computer equipment and storage medium
CN113157738B (en) In-heap data cache synchronization method and device, computer equipment and storage medium
CN104156427A (en) Graph drawing method and system supporting large data volume fast refreshing
CN108132716A (en) Method of adjustment, equipment and the computer readable storage medium of browse page
CN113763552A (en) Three-dimensional geographic model display method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240201

Address after: Room 801, 85 Kefeng Road, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: Yami Technology (Guangzhou) Co.,Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right