CN103544207B - A kind of method and system of picture loaded and displayed - Google Patents

A kind of method and system of picture loaded and displayed Download PDF

Info

Publication number
CN103544207B
CN103544207B CN201310361511.1A CN201310361511A CN103544207B CN 103544207 B CN103544207 B CN 103544207B CN 201310361511 A CN201310361511 A CN 201310361511A CN 103544207 B CN103544207 B CN 103544207B
Authority
CN
China
Prior art keywords
picture
list
loaded
image
downloading
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.)
Expired - Fee Related
Application number
CN201310361511.1A
Other languages
Chinese (zh)
Other versions
CN103544207A (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201310361511.1A priority Critical patent/CN103544207B/en
Publication of CN103544207A publication Critical patent/CN103544207A/en
Application granted granted Critical
Publication of CN103544207B publication Critical patent/CN103544207B/en
Expired - Fee Related 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/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A kind of method and system of picture loaded and displayed loads for picture application in intelligence system and shows picture, and method includes: to establish picture list, for storing all pictorial informations;Picture load list is established, needs pictorial information to be loaded in picture list for storing;It establishes picture and shows list, need pictorial information to be shown in picture list for storing;Download pictures list is established, for storing the pictorial information downloaded;Picture using download pictures after starting and saves pictorial information into the picture list, show that the picture total quantity in list carries out building and shows according to picture, and needing picture to be shown to carry out loaded and displayed picture according to the previous screen of current display screen and/or latter screen, previous screen and/or latter screen beyond current display screen need picture to be shown to be not loaded with display.By purposefully load and releasing memory and reasonable picture compression downloading can alleviate low memory problem, also improve speed when browsing pictures.

Description

A kind of method and system of picture loaded and displayed
Technical field
The present invention relates to intelligent terminal system more particularly to the method and systems of a kind of picture load and display.
Background technique
Currently, picture application program is frequently encountered low memory when Loading Image and showing in Android system Problem could continue to Load Image to be shown, low memory is gone again when encountering low memory after needing to discharge partial memory Releasing memory continues load and compares passively for system administration, will also result in picture and shows that speed slows down;Also, in picture During display, the picture of indication range will be exceeded, after being discharged in the case where not influencing user's surfing, can obtained The load of other pictures is carried out to more memories, however, even if having released in time no longer during showing picture The problem of display picture of committed memory, still there may be low memories, for example one high-resolution picture of load can To cause low memory, lead to system therefore more effectively loading method and memory management mechanism right and wrong in loaded and displayed picture It is often necessary.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
Place in view of above-mentioned deficiencies of the prior art, the present invention are to solve the defect and deficiency of the prior art, propose one kind The method and system of picture loaded and displayed, propose one kind can in time releasing memory, according to memory situation picture is closed The picture loading display method and system for managing compression, solve low memory problem in picture downloading process, and improve picture browsing Fluency.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of method of picture loaded and displayed loads for picture application in intelligence system and shows picture, wherein including Following steps:
Picture list is established, for storing all pictorial informations;
Picture load list is established, needs pictorial information to be loaded in the picture list for storing;
It establishes picture and shows list, need pictorial information to be shown in the picture list for storing;
Download pictures list is established, for storing the pictorial information downloaded;
Display when picture is downloaded according to screen needs and the utilization rate of current memory carries out compression downloading to picture;Figure Piece using download pictures after starting and saves pictorial information into the picture list, and picture is applied and shown according to the picture Picture total quantity in list carries out building display photo frame, and needs to show according to the previous screen of current display screen and/or latter screen The picture shown carries out loaded and displayed picture, and previous screen and/or latter screen beyond current display screen need picture to be shown not Load.
The method of the picture loaded and displayed, wherein the pictorial information includes local pictorial information and network picture Information.
The method of the picture loaded and displayed, wherein further comprise the steps of: after picture load thread starting, by this The ID stored in list finds corresponding pictorial information in picture list, then obtains object picture according to picture path.
The method of the picture loaded and displayed, wherein when further comprising the steps of: building picture display list, will need aobvious ID of the picture shown in picture list arranges whether the picture in not needs to load or show to judge currently load.
The method of the picture loaded and displayed, wherein further comprise the steps of: when the picture application Loads Image display When, which does not show in the picture is then not loaded with the picture in list, and the Image ID is moved from picture load list Out, the picture is discharged if when user's operation is not shown no longer to show.
A kind of system of picture loaded and displayed, wherein the system comprises picture list establishes module, pictorial information mould Block, picture download compression module, picture loading module, picture display module, download pictures module;
The picture list establishes module for establishing picture list, for storing all pictorial informations;Picture is established to add Table is listed, needs pictorial information to be loaded in the picture list for storing;It establishes picture and shows list, it is described for storing Pictorial information to be shown is needed in picture list;Download pictures list is established, for storing the pictorial information downloaded;
The pictorial information module for download pictures after picture application starting and saves pictorial information to the picture In list;
According to the display needs of screen and making for current memory when the picture downloading compression module is downloaded for picture Compression downloading is carried out to picture with rate;
The picture loading module is applied for picture and shows that the picture total quantity in list carries out structure according to the picture Display photo frame is built, and needs picture to be shown to carry out loaded and displayed picture according to the previous screen of current display screen and/or latter screen, Previous screen and/or latter screen beyond current display screen need picture to be shown to be not loaded with;
The picture display module is used to show the picture in the picture load list;
The module of download pictures is for recording the Image ID downloaded.
The system of the picture loaded and displayed, wherein the pictorial information module be used for according to local pictorial information or Network picture information preservation pictorial information.
The system of the picture loaded and displayed, wherein the picture loading module is being loaded for judging that picture is applied Whether picture in the picture display list is loaded when picture.
Compared with prior art, the present invention by establishing picture list, picture loads list, picture shows list and Download pictures list come save picture download information, picture whether the information of loaded and displayed, picture application thread starting after can root According in above-mentioned table picture concerned information and display status information come carry out loaded and displayed or discharge picture movement, realization have mesh Load and releasing memory, and carry out reasonable picture compression downloading, memory be effectively relieved in picture loading procedure not The problem of foot, improves the speed of user's browsing pictures.Also, when picture is downloaded, downloading can be compressed, saves memory.
Detailed description of the invention
Fig. 1 is the picture display schematic diagram of picture loading display method embodiment one of the present invention.
Fig. 2 is the picture display schematic diagram of picture loading display method embodiment two of the present invention.
Fig. 3 is the picture display schematic diagram of picture loading display method embodiment three of the present invention.
Fig. 4 is the picture load flow chart of picture loading display method embodiment one, two, three of the present invention.
Fig. 5 is the picture loaded and displayed flow chart of picture loading display method embodiment one, two, three of the present invention.
Fig. 6 is the system function functional block diagram of the picture loaded and displayed of the embodiment of the present invention.
Specific embodiment
A kind of method and system of picture loaded and displayed provided by the invention, for make the purpose of the present invention, technical solution and Advantage is clearer, clear, and the present invention is described in more detail as follows in conjunction with drawings and embodiments.It should be appreciated that herein Described specific embodiment is only used to explain the present invention, is not intended to limit the present invention.
A kind of method of picture loaded and displayed provided in an embodiment of the present invention, comprising the following steps:
Step 1: initially setting up for storing all pictorial information picture lists.Described in step 1 specific as follows:
Step 1 obtains each pictorial information building picture list, is used to store all pictorial informations.It include: picture name Claim, picture path, photo resolution, picture size etc..
In this example, the picture being related to includes local picture (being stored in flash, SD card, the media mediums such as USB flash disk) and network Picture.Network picture includes media medium figure in the picture that network operator server provides and the local area network of network neighbor's acquisition Piece.
Wherein, local pictorial information acquisition includes: to obtain current media medium by the scanning of hardware device drivers layer Then pathname is scanned All Files according to picture suffix name (such as .jpg .png .gif etc.), by what is scanned Picture file information preservation is to picture list.
Network picture information acquisition is prepared by the following:
A. the pictorial information that network operator provides obtains: application obtains pictorial information by the interface that operator provides, By information preservation in picture list.The interface that operator provides is decided through consultation by application side and operator side's agreement.
B. network neighbor obtains media medium pictorial information in local area network and obtains: it is (online to detect interface by network neighbor Neighbor detection method is not described in detail not in the invention scope) the network neighbor address (IP) for having shared resource is obtained, then sweep It retouches All Files folder under the address and obtains pictorial information, pictorial information is stored in picture list.
Second step, building picture load list, and building picture shows list, constructs (the i.e. step 2) of download pictures list.
Wherein, step 21, building picture load list: be used to store the ID needed picture to be loaded in picture list and The callback interface for display after the completion of picture downloading.
As shown in Figure 1 to Figure 3, after picture load thread starting, the ID stored in list is loaded by the picture, is found Then corresponding pictorial information in picture list obtains object picture according to picture path;Such as: most start, current screen 10 It shows that page is page 1, needs to load page 2 in total, be currently displayed to user is page 1, and page 2 of next screen 11 is as caching Page, to guarantee that user checks the fluency of picture speed.If one page shows 15, currently need picture to be loaded for figure 15*2=30 in piece list, then, this picture, which loads in list, to store 0 to 29 according to loading sequence;If worked as Preceding screen picture is shown as page 2, then a screen page 1 on caching page, and next screen page 3, picture loads the sequence of list are as follows: 15~ 29, then 0~14,30~44 (assuming that having enough pictures).
The callback interface of the picture provided in the picture load list of the embodiment of the present invention, when being completed for picture downloading, Judge whether picture needs to show and realize the method that picture is shown.
Step 22, building picture show list: being used to store the ID, Yi Jiyong for needing picture to be shown in picture list To judge currently to load whether the picture in list needs to load or show.
Specifically it is possible, firstly, to the Image ID loaded and picture be shown that list compares, if the Image ID It does not show in list, then directly skips in picture, be not loaded with current image, and ID is removed from picture load list;Secondly, plus When carrying picture, the picture still need it is to be shown, but because picture load needs the time, after loading is complete, because of user Operation, the display page have changed, and picture does not need to show again, so, it should be discharged, it is allowed no longer to show, to protect Demonstrate,prove the correctness of picture browsing (judgement occurs in the picture callback interface that picture load list defines).
Step 23, building download pictures list: for storing the current display screen downloaded and caching screen map The ID of piece.Before the downloading of each picture, judge whether have the identical picture resource downloaded, to reuse resource.
Step 3: display when picture is downloaded according to screen needs and the utilization rate of current memory compresses picture Downloading;Picture using download pictures after starting and saves pictorial information into the picture list, and picture is applied according to Picture shows that the picture total quantity in list carries out building display photo frame, and according to the previous screen of current display screen and/or latter Screen needs picture to be shown to carry out loaded and displayed picture, and previous screen and/or latter screen beyond current display screen need to be shown Picture is not loaded with, described in detail below,
The downloading of picture is to obtain Image ID from picture load list and carry out, if (figure during downloading Piece a not yet downloads completion), user has carried out picture display switching, i.e., no longer show current image a, but other picture b, that Whether it is necessary to go to show that the pictorial information in list compares with picture after a downloading, seeing still need to be to be shown Picture.
Download pictures are then to save to have downloaded successful pictorial information.Because saving current screen, a upper screen/next Shield picture, so a really upper screen or next screen become current screen after switching a screen.If downloaded before The picture of a screen or next screen on picture, there is no need to re-download, here it is the effects of this list.It is described in detail below:
Step 3 is divided into the introduction that two kinds of scenes of A and B carry out picture load list and picture display list load.It is other to answer It only needs to design picture with scene and shows list and picture load list, the working principle of picture load sub thread does not become Change.
A. every screen needs to show multiple thumbnail scenes (photograph album application etc.).
The photo frame for showing picture is constructed on the screen according to picture total quantity, and is filled out with default background picture It fills.It modifies picture load list and picture shows list.Current image sum is set as n, every screen shows that picture is m, currently Page is p, then constructs screen photo frame are as follows:
A. as p=1,
As n≤m, then need to construct m photo frame, and fill default picture;0~m-1 of Image ID is added to picture to add It lists table and picture shows list.
Work as n > m and n > 2*m, then need to construct 2*m photo frame, and fill default picture, 0~2*m-1 of Image ID is added List is loaded into picture and picture shows list.
Work as n > m and n≤2*m, then need to construct n photo frame, and fill default picture, 0~n-1 of Image ID is added to Picture loads list and picture shows list.As shown in Fig. 1 top half.
B. when user turn over screen browsing, when p > 1,
As current image sum n < (p*m), then need to construct m+ (n- (p-1) * m) a photo frame, and fill default picture; Image ID (p-1) * m~n -1 and previous screen Image ID (p-2) * m~(p-1) * m-1 will currently be shielded and be added to picture load list List is shown with picture, as shown in Fig. 3 top half.
As n > (p*m) and n≤(p+1) * m, then need to construct 2*m+ (n-p*m) a photo frame, and fill default picture; Image ID (p-1) * m~p*m -1, previous screen Image ID (p-2) * m~(p-1) * m-1 and latter screen Image ID p*m will currently be shielded ~n-1 is added to picture load list and picture shows list.
As n > (p+1) * m, then need to construct 3*m photo frame, and fill default picture;Image ID (p-1) * will currently be shielded M~p*m-1, previous screen Image ID (p-2) * m~(p-1) * m-1 and latter screen Image ID p*m~(p+1) * m-1 are added to figure Piece loads list and picture shows list.
B. every screen only needs to show the application scenarios (Photo Browser, picture browsing etc. in webpage) of a picture.
Picture sum is set as n, the Image ID currently shown is m.
A. as n=1, a photo frame, filling default picture are constructed.Image ID 0 is added to picture load list and figure Piece shows list.
B. when user is operated, when n > 1
As m=0,2 photo frames, filling default picture are constructed.Image ID 0 and 1 is added to picture load list and figure Piece shows list.As shown in the lower half portion Fig. 1.
As m > 0,3 photo frames, filling default picture are constructed.By picture m, m-1 and m+1 be added to picture load list and Picture shows list.As shown in the lower half portion Fig. 2.
As m=n-1,2 photo frames, filling default picture are constructed.Picture m, m-1 are added to picture load list and figure Piece shows list.As shown in the lower half portion Fig. 3.
In the present embodiment, it should be noted that the load of picture is an asynchronous process, and picture loads list and picture Display list is for this asynchronous load, so picture load sub thread and main thread concurrently execute in no particular order; When picture in main thread loads list and picture display list change, picture loads the picture for loading and showing in sub thread all It can dynamic change.
Constructed in the present embodiment picture load list and picture show list be in order to prevent asynchronous download pictures when It waits, user switches screen and the picture of downloading is made not needed to show and cause mistake.Download pictures list is to save downloading The picture finished is to avoid repeated downloads picture.
Process, which is described further, to be shown to picture downloading process of the invention and picture below by way of specific example:
Wherein, the detailed process of picture downloading is as shown in figure 4, specifically include:
Step S10, whether downloading sub thread starts, and S11 is entered step when being, S12 is entered step when no.
Step S11, after sub thread starts, judge whether sub thread is waited for, S13 entered step when being, S14 is entered step when no.
Step S12, carrier thread does not start instantly, then control allows downloading sub thread not start and be transferred to step S14.
Step S13, it activates, i.e., when sub thread is starting state, but sub thread is wait state, sub-line need to be activated again Journey.All picture downloadings finish, so sub thread waits task next time, need to activate sub thread again.
A new sub thread is created in the present embodiment not need namely to judge wait state.Only create It just needs to judge whether to be waited for before to need to activate when thread reuses to continue to work.
Step S14, do you judge that picture load list is empty? S15 is entered step when being, S16 is entered step when no.
Step S15, sub thread waits.In the present embodiment when picture load list length be 0 when, picture load sub thread into Enter wait state, waits the subsequent operation of user.
Step S16, first object in delete list, and the ID is obtained, it is transferred to step S17.
Step S17, judge whether to be that picture shows list? return step S14 when no, S18 is entered step when being.
Step S18, judge whether there is in download pictures list? S14 is returned when being, S19 is entered step when no.
Step S19, technique compresses multiple on demand, and enter step S20.
Step S20, download pictures, and enter step S21.
Step S21, judge whether memory overflows, S22 is entered step when being, S23. is entered step when no
Step S22, bigger compression multiple, and return step S20 are set.That is step S19-22 when needing download pictures, It is needed according to the display of screen and the utilization rate of current memory carries out compression downloading to picture.A kind of this sacrifice picture quality Compression method, by original picture occupy amount of ram get off at the compression of multiple.Such as the picture of a 1200*1200, it is wide and It is high all to compress 8 times, then the memory occupied is just 1/ (8*8)=1/64 of original image.It can prevent low memory.
Step S23, download pictures success, and enter step S24.
Step S24, it is added to download pictures list.
In picture downloading process of the present invention, it is first determined whether picture load sub thread is had been turned on, it is inactive, it is opened It is dynamic;It has been started up, judges whether sub thread is waited for, activated if being waited for;Wherein, sub-line The working principle of journey is: working when in harness, rests and wait when work.
Then judge whether picture load list is sky, and if it is sky, picture enters wait state if loading sub thread;Such as The load list of fruit picture is not empty, the then following operation of continuation.
First object (the step S16 in such as Fig. 4) in picture load list is removed, which is stored in one and is faced In variations per hour I (removing object is to guarantee that list has been empty at the end of picture load all objects of list all judge). The Image ID is obtained from variable I as the Image ID currently loaded, and goes to judge whether to show in list in picture (as schemed Step S17 in 4).Do not exist, then skips and carry out next picture downloading;It shows in list, is entered back into if there is in picture Download pictures list goes to judge whether the Image ID has been successfully downloaded (such as step S18), if existing illustrate picture Textures success, does not need to re-download, skips the downloading for carrying out next picture.
When picture is downloaded successfully, Image ID is added into download pictures list, the readjustment of picture is obtained from variable I Function carries out the display processing of picture;When load list length is 0, thread is waited for.
In the present embodiment, before picture downloading, need to be configured according to picture demand size, when needing download pictures When, it is needed according to the display of screen and the utilization rate of current memory carries out compression downloading to picture.Downloaded in the present embodiment Picture into memory is the picture through overcompression rather than then downloading original image adjusts picture size again.Downloading original image adjusts again Size not can be reduced the amount of ram of picture occupancy, at least during download pictures, the occupancy of memory or very high. Such as original image size 1200*1200, the picture size that screen is shown are as follows: 150*100, then it can be by the high progress of the width of picture Equal proportion compression, carries out 1200/150=8 times of compression, that is, the picture after downloading is 1/8 wide * 1/8 original high=1/64 original Figure size has saved significant portion of memory.If still exceeded by the compressed picture committed memory of demand size Then picture then can be carried out smaller scale compression by exception catching by the memory size (such as step S21) that system provides, Smaller picture is obtained, does stretching appropriate when display, to meet the size of the required picture of application.This way is in breviary The optimization of memory is especially apparent when figure production.
In the present invention, picture show process as shown in figure 5, picture show process specifically includes the following steps:
Step S30, user checks next screen picture, is transferred to step S31.
Step S31, judge that next screen picture whether there is, S32 is entered step when no, S33 is entered step when being.
Step S32, user is prompted, next screen picture is not present.
Step S33, next screen picture is shown as currently shielding, and is transferred to step S34.
Step S34, it empties picture load list and picture shows list, and be transferred to step S35.
Step S35, upper screen picture whether there is before tangent screen, and S36 is entered step when being, S37 is entered step when no.
Step S36, the Image ID is deleted in download pictures list, and is transferred to step S37.
Step S37, next screen picture whether there is after tangent screen, and S38 is entered step when being, S39 is entered step when no.
Step S38, next screen photo frame is created, and is transferred to step S39.
Step S39, download pictures sub thread, and it is transferred to step S40.
Step S40, download pictures success, and it is transferred to step S41.
Step S41, picture call back function is called, and is transferred to step S42.
Step S42, whether picture shows in list in picture, and S43 is entered step when no, S44 is entered step when being.
Step S43, simultaneously releasing memory is deleted from download pictures list.
Step S44, corresponding photo frame is shown.
In the present embodiment, when user browses other pages of pictures, terminal can indicate to show previous ping buffer figure according to user Piece or latter ping buffer picture are as current screen picture.Such as: current screen display page is page 3, and left side is page 2, and right side is Page 4.User needs to browse the picture of page 2, then screen slides to the right.At this point, current page becomes second page, left side needs newly to add Add page 1 as caching page, right side page 3 is used as caching page.The picture of page 4 has not been caching screen picture, needs to discharge interior It deposits.The Image ID sequence of this page is deleted from download pictures list, discharges the memory of screen picture occupancy.At the same time It empties picture load list and picture shows list (step S34 as shown in Figure 5), counted again according to step 3 noted earlier Nomogram piece loads list and picture shows list.
And it downloads successful picture and is invoked at the call back function for registering the picture of realization in picture load list (such as Fig. 5 institute The step S41 shown).The function passes through and picture shows list comparison, judges whether the picture is to need to show picture.If It is then to show the picture, replaces default picture;Otherwise, the occupied memory of the picture is discharged, and by it from having downloaded figure (note: before and after picture acquisition, since the time is longer, the page turn over operation of user will lead to picture and show at this time for deletion in piece list The variation of list and load list, and the picture downloaded cannot be released, so there is this judgement).
In the present embodiment, because picture is asynchronous load, picture loads sub thread (Fig. 4 and step shown in fig. 5) (step 1-> step 3) concurrently executes in no particular order, and the picture load list and picture in main thread are shown with main thread When list changes, is loaded in picture load sub thread and the picture of display all can dynamically change.
Based on the above embodiment, the present invention also provides a kind of systems of picture loaded and displayed, as shown in fig. 6, the system System includes: that picture list establishes module 610, pictorial information module 620, picture downloading compression module 630, picture loading module 640, picture display module 650, download pictures module 660;
Wherein, the picture list establishes module 610 for establishing picture list, for storing all pictorial informations;It builds Vertical picture loads list, and pictorial information to be loaded is needed in the picture list for storing;It establishes picture and shows list, be used for Storing needs pictorial information to be shown in the picture list;Download pictures list is established, for storing the figure downloaded Piece information;
The pictorial information module 620 for download pictures after picture application starting and saves pictorial information to the figure In piece list;
Display when picture downloading compression module 630 is downloaded for picture according to screen needs and current memory Utilization rate carries out compression downloading to picture;
The picture loading module 640 is applied for picture and shows that the picture total quantity in list is carried out according to the picture Building display photo frame, and need picture to be shown to carry out loaded and displayed figure according to the previous screen of current display screen and/or latter screen Piece, previous screen and/or latter screen beyond current display screen need picture to be shown to be not loaded with;
The picture display module 650 is used to show the picture in the picture load list;
The module of download pictures 660 is for recording the Image ID downloaded.
Wherein, the pictorial information module 620 is also used to according to local pictorial information or network picture information preservation picture Information.
The picture loading module 640 is also used to judge that picture is applied and whether loads the picture when Loading Image and show Picture in list.
In conclusion the present invention be by establishing picture list, picture loads list, picture shows list and downloading figure Piece list judges whether picture has been downloaded, needs according to the data of above-mentioned picture list after picture load thread starting The case where picture of display, with efficent use of resources, after being compressed when picture downloads the storage of no enough memories under Storage is carried, avoids occurring the case where low memory in picture loading procedure, it is small that the list of foundation calculates data volume, and can have Purpose Load Image and releasing memory, alleviate low memory the problem of, improve user's browsing pictures speed.
In the present invention when Loading Image, by picture according to the display needs of screen (full screen display, thumbnail are shown) Picture compression downloading request is carried out, rather than original image downloading expends memory;It, can if occurring low memory problem in downloading process Picture is carried out compression downloading again, the picture after downloading stretches display, guarantees to scheme in a manner of sacrificing picture and show quality Piece downloads effect.
In the present invention picture show be user is showed by current screen picture on the basis of.Retain current screen figure Piece preloads a part of picture in front and back as caching picture, would not influence the fluency of user's browsing pictures, and it is other The picture memory of load will be released, and reducing the amount of ram that application occupies can also provide more so that browsing pictures speed is faster More memories is to i.e. by picture to be shown.
It should be understood that the foregoing is merely illustrative of the preferred embodiments of the present invention, it is not sufficient to limit of the invention Technical solution within the spirit and principles in the present invention, can add according to the above description for those of ordinary skills With increase and decrease, replacement, transformation or improvement, and all these increases and decreases, replacement, transformation or improved technical solution, it all should belong to this The protection scope of invention appended claims.

Claims (6)

1. a kind of method of picture loaded and displayed loads for picture application in intelligence system and shows picture, which is characterized in that Include the following steps:
Picture list is established, for storing all pictorial informations;
Picture load list is established, needs pictorial information to be loaded in the picture list for storing;
It establishes picture and shows list, need pictorial information to be shown in the picture list for storing;
Download pictures list is established, for storing the pictorial information downloaded;
The pictorial information includes: picture name, picture path, photo resolution, picture size and Image ID;
Display when picture is downloaded according to screen needs and the utilization rate of current memory carries out compression downloading to picture, and under The picture being downloaded in memory is the picture through overcompression rather than downloading original image adjusts picture size again;Under after picture application starting It carries picture and saves pictorial information into the list of download pictures, picture is applied to be shown in list according to the picture Picture total quantity carries out building display photo frame, and needs picture to be shown according to the previous screen of current display screen and/or latter screen Loaded and displayed picture is carried out, previous screen and/or latter screen beyond current display screen need picture to be shown to be not loaded with;
After picture load thread starting, the Image ID stored in list is loaded by picture, is found corresponding in picture list Then pictorial information obtains object picture according to picture path;
The picture load list, which is specifically used for storage, needs Image ID and the figure of the picture to be loaded in picture list The callback interface for display after the completion of piece downloading;Wherein, the callback interface is specifically used for, and when picture downloading is completed, sentences Whether disconnected picture needs to show and realize that picture is shown;
The display when picture is downloaded according to screen needs and the utilization rate of current memory carries out compression downloading to picture Afterwards further include: judge whether memory overflows, when being, increase compression multiple and return to the step for executing and carrying out compression downloading to picture Suddenly;
When the picture application, which Loads Image, to be shown, which does not show in list in the picture is then not loaded with the figure Piece, and the Image ID is removed from picture load list, the picture is discharged if when user's operation is not shown no longer to be shown;
In picture downloading process, when list is empty for the load of judgement picture, picture load sub thread enters wait state;When sentencing Picture load list is determined when not being sky, removes first object in picture load list, which is stored in temporary variable In, the Image ID of the picture is obtained from the temporary variable as the Image ID currently loaded, and judge described currently to load Image ID, if not existing, carries out next picture downloading whether in display list;If the Image ID currently loaded exists It is shown in list in picture, enters back into download pictures list and judge the corresponding picture of the Image ID whether by under successfully It carries;When picture is downloaded successfully, Image ID is added into download pictures list, and the picture is obtained from the temporary variable Call back function, carry out the picture display processing.
2. the method for picture loaded and displayed according to claim 1, which is characterized in that the pictorial information includes this map Piece information and network pictorial information.
3. the method for picture loaded and displayed according to claim 1, which is characterized in that it is aobvious to further comprise the steps of: building picture When showing list, picture to be shown will be needed to be judged currently to load the picture in list according to the Image ID in the picture list of place Whether need to load or show.
4. a kind of system of picture loaded and displayed, which is characterized in that the system comprises picture list establishes module, picture letter Cease module, picture downloads compression module, picture loading module, picture display module, download pictures module;
The picture list establishes module for establishing picture list, for storing all pictorial informations;Establish picture load column Table needs pictorial information to be loaded for storing in the picture list;It establishes picture and shows list, for storing the picture Pictorial information to be shown is needed in list;Download pictures list is established, for storing the pictorial information downloaded;
The pictorial information includes: picture name, picture path, photo resolution, picture size and Image ID;
The pictorial information module for download pictures after picture application starting and saves pictorial information to the column of download pictures In table;
The picture downloading compression module is needed when downloading for picture according to the display of screen and the utilization rate of current memory The picture that picture is carried out compression downloading, and downloaded in memory is the picture through overcompression rather than downloading original image adjusts again Picture size;The picture loading module is applied for picture and shows that the picture total quantity in list carries out structure according to the picture Display photo frame is built, and needs picture to be shown to carry out loaded and displayed picture according to the previous screen of current display screen and/or latter screen, Previous screen and/or latter screen beyond current display screen need picture to be shown to be not loaded with;
The picture display module is used to show the picture in the picture load list;
The module of download pictures is for recording the Image ID downloaded;
The picture downloading compression module is also used to, and after picture load thread starting, passes through what is stored in picture load list Image ID finds corresponding pictorial information in picture list, then obtains object picture according to picture path;
The picture loads list, needs Image ID and the figure of the picture to be loaded in picture list specifically for storage The callback interface for display after the completion of piece downloading;Wherein, the callback interface is specifically used for, and when picture downloading is completed, sentences Whether disconnected picture needs to show and realize that picture is shown;
The picture downloading compression module is also used to, in picture downloading according to the display needs and current memory of screen Utilization rate compression downloading is carried out to picture after, judge whether memory overflows, when being, increase compression multiple simultaneously return to execution The step of compression downloading is carried out to picture;
Whether the picture loading module is also used to judge that picture is applied and is loaded in the picture display list when Loading Image Picture;
The picture downloading compression module is also used to, in picture downloading process, when list is empty for the load of judgement picture, and picture Load sub thread enters wait state;When determining picture load list is not sky, first in picture load list is removed The object is stored in temporary variable by object, and the Image ID of the picture is obtained from the temporary variable as currently loading Image ID, and judge that the Image ID currently loaded whether in display list, if not existing, carries out under next picture It carries;It is shown in list if the Image ID currently loaded is present in picture, enters back into download pictures list and judge the figure Whether the corresponding picture of piece ID has been successfully downloaded;When picture is downloaded successfully, Image ID is added into download pictures list, And the call back function of the picture is obtained from the temporary variable, carry out the display processing of the picture.
5. the system of picture loaded and displayed according to claim 4, which is characterized in that the pictorial information module is used for root According to local pictorial information or network picture information preservation pictorial information.
6. the system of picture loaded and displayed according to claim 4, which is characterized in that the picture loading module is for sentencing Disconnected picture applies the picture whether loaded in the picture display list when Loading Image.
CN201310361511.1A 2013-08-19 2013-08-19 A kind of method and system of picture loaded and displayed Expired - Fee Related CN103544207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310361511.1A CN103544207B (en) 2013-08-19 2013-08-19 A kind of method and system of picture loaded and displayed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310361511.1A CN103544207B (en) 2013-08-19 2013-08-19 A kind of method and system of picture loaded and displayed

Publications (2)

Publication Number Publication Date
CN103544207A CN103544207A (en) 2014-01-29
CN103544207B true CN103544207B (en) 2019-01-29

Family

ID=49967660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310361511.1A Expired - Fee Related CN103544207B (en) 2013-08-19 2013-08-19 A kind of method and system of picture loaded and displayed

Country Status (1)

Country Link
CN (1) CN103544207B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335047B (en) * 2014-08-14 2024-05-28 小米科技有限责任公司 Picture display method and device
CN105446763B (en) * 2014-09-30 2019-01-29 Tcl集团股份有限公司 A kind of method and system of picture load and display
CN105989166B (en) * 2015-03-04 2019-06-21 阿里巴巴集团控股有限公司 Waterfall-type shows method, apparatus, system and the electronic equipment of object
WO2016183795A1 (en) 2015-05-19 2016-11-24 Guangzhou Ucweb Computer Technology Co., Ltd. Method, apparatus for loading a resource in a web page on a device
CN105045592A (en) * 2015-07-24 2015-11-11 北京金山安全软件有限公司 Picture display method and device
CN105843831A (en) * 2016-01-15 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal image display method and system
CN109947340A (en) * 2016-03-21 2019-06-28 青岛海信移动通信技术股份有限公司 A kind of picture loading method, device and terminal
CN106407367A (en) * 2016-09-08 2017-02-15 深圳市彬讯科技有限公司 Method for quickly viewing pictures online
CN106547624B (en) * 2016-11-04 2021-01-01 武汉斗鱼网络科技有限公司 Android-based picture loading method and device
CN107179947A (en) * 2017-04-26 2017-09-19 武汉斗鱼网络科技有限公司 A kind of network picture method for down loading and system for mobile terminal
CN107193887B (en) * 2017-04-28 2019-01-29 武汉斗鱼网络科技有限公司 A kind of method and device for the resource that Loads Image
CN107357650B (en) * 2017-06-06 2020-12-15 武汉斗鱼网络科技有限公司 Automatic memory release method and system based on picture resources
CN108073698B (en) * 2017-12-11 2019-08-23 武汉斗鱼网络科技有限公司 Real-time animation display methods, device, electric terminal and readable storage medium storing program for executing
CN109992406B (en) * 2017-12-29 2022-06-07 北京京东尚科信息技术有限公司 Picture request method, picture request response method and client
CN108769806B (en) * 2018-06-19 2020-05-05 聚好看科技股份有限公司 Media content display method and device
CN110175053B (en) * 2019-04-24 2023-10-27 创新先进技术有限公司 Picture loading method and device
CN110658969B (en) * 2019-10-08 2024-01-09 广州市百果园信息技术有限公司 Picture processing method, device, equipment and storage medium
CN113360687A (en) * 2021-06-24 2021-09-07 平安普惠企业管理有限公司 Picture saving method and device, mobile terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221580A (en) * 2008-01-03 2008-07-16 中兴通讯股份有限公司 Method for improving page layout display performance of embedded browser
CN102541538A (en) * 2011-12-06 2012-07-04 Tcl集团股份有限公司 Picture displaying method and device based on mobile terminal
CN102629254A (en) * 2012-02-29 2012-08-08 惠州市德赛西威汽车电子有限公司 Method for rapidly reading pictures
CN102650946A (en) * 2012-03-22 2012-08-29 杭州梵艺科技有限公司 Method for loading and displaying graphical interface at hand-held terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221580A (en) * 2008-01-03 2008-07-16 中兴通讯股份有限公司 Method for improving page layout display performance of embedded browser
CN102541538A (en) * 2011-12-06 2012-07-04 Tcl集团股份有限公司 Picture displaying method and device based on mobile terminal
CN102629254A (en) * 2012-02-29 2012-08-08 惠州市德赛西威汽车电子有限公司 Method for rapidly reading pictures
CN102650946A (en) * 2012-03-22 2012-08-29 杭州梵艺科技有限公司 Method for loading and displaying graphical interface at hand-held terminal

Also Published As

Publication number Publication date
CN103544207A (en) 2014-01-29

Similar Documents

Publication Publication Date Title
CN103544207B (en) A kind of method and system of picture loaded and displayed
CN111158619B (en) Picture processing method and device
CN103677942B (en) A kind of method and apparatus of movable terminal to browse network pictures
CN102541538B (en) Picture displaying method and device based on mobile terminal
CN106941567A (en) Show method, device and the user terminal of network picture
CN110020323A (en) Mix page switching method, frame, computer equipment and the storage medium of application
CN102982044A (en) Method and device for webpage browsing
CN106982388B (en) Picture display method and device
CN104199920A (en) Adaptation method and device for display of web application
CN104699626A (en) Terminal internal memory processing method, device and terminal
CN105868420A (en) Network resource loading mode configuration method and device
CN106453572A (en) Method and system for synchronizing images based on cloud server
CN109361947A (en) Internet resources batch loading method, smart television, storage medium and device
CN104793945A (en) Large-batch picture displaying method for preventing memory overflow and device thereof
CN110609718A (en) Picture loading method and device, electronic equipment and readable storage medium
CN105912591A (en) Method and device for looking back image documents and mobile terminal
CN110209447B (en) List page data display method and list page data display device
CN112784188A (en) Page rendering method and device
CN108681469B (en) Page caching method, device, equipment and storage medium based on Android system
CN106527891B (en) A kind of edit object selection method and relevant apparatus
CN106933702A (en) A kind of method of intelligent terminal storage space management, device and intelligent terminal
CN103208128A (en) Method and device for displaying picture
CN111767417A (en) Application picture management method, device, equipment and storage medium
CN115495020A (en) File processing method and device, electronic equipment and readable storage medium
CN110309079A (en) A kind of method and device of data buffer storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190129