Summary of the invention
Therefore, the technical problem to be solved in the present invention is to overcome in prior art the problem of resource waste shown in the larger image process of data volume.
For this reason, the embodiment of the present invention provides a kind of method for displaying image, and comprise the steps: the thumbnail loading original image, the resolution of described thumbnail is less than described original image; Show described thumbnail; When receiving the amplifieroperation to described thumbnail, monitoring described amplifieroperation and whether stopping; If described amplifieroperation does not stop, then when current multiplication factor reaches preset multiple, another thumbnail of described original image is generated according to described preset multiple, load another thumbnail described, and display another thumbnail described, the resolution of the thumbnail of wherein current loading is greater than the resolution of last thumbnail.
Preferably, when described amplifieroperation stops, another thumbnail of described original image is generated according to current multiplication factor.
Preferably, before another thumbnail described in described loading, also comprise: the thumbnail discharging current loading.
Preferably, described preset multiple has multiple.
Preferably, the pass of described multiple preset multiple is Sn=(Sn-1 – Sn-2) * m+Sn-1, wherein n >=2, and Sn is next preset multiple, and Sn-1 is last preset multiple, and S1=S0+N, S0=1, N, m are positive number, 0≤N≤1, m >=1.
Correspondingly, the embodiment of the present invention also provides a kind of image display device, comprising: loading unit, and for loading the thumbnail of original image, the resolution of described thumbnail is less than described original image; Display unit, for showing described thumbnail; Whether monitoring means, for when receiving the amplifieroperation to described thumbnail, monitoring described amplifieroperation and stopping; Refresh unit, for when described amplifieroperation does not stop, when current multiplication factor reaches preset multiple, another thumbnail of described original image is generated according to described preset multiple, load another thumbnail described, and display another thumbnail described, the resolution of the thumbnail of wherein current loading is greater than the resolution of last thumbnail.
Preferably, also comprise: the second refresh unit, for when described amplifieroperation stops, generate another thumbnail of described original image according to current multiplication factor.
Preferably, also comprise: releasing unit, for before another thumbnail described in described loading, discharge the thumbnail of current loading.
Preferably, described preset multiple has multiple.
Preferably, the pass of described multiple preset multiple is Sn=(Sn-1 – Sn-2) * m+Sn-1, wherein n >=2, and Sn is next preset multiple, and Sn-1 is last preset multiple, and S1=S0+N, S0=1, N, m are positive number, 0≤N≤1, m >=1.
Technical solution of the present invention, tool has the following advantages:
The method for displaying image provided according to the embodiment of the present invention and device, user can by generating according to original image at first, to load and the thumbnail shown checks the overview of original image, and can amplify the carrying out of initial thumbnail, in amplification process, whether the current amplifieroperation of Real-Time Monitoring reaches default multiplication factor, regenerate at once when reaching default multiplication factor, load another thumbnail that also display resolution is higher, internal memory can be saved thus when showing image, the resources such as video memory, and make user see the thumbnail that multiple resolution is different successively in the process be exaggerated at thumbnail.
There is multiple preset multiple in technical solution of the present invention, and can, when multiplication factor is less, make the refreshing frequency of thumbnail higher; When multiplication factor is larger, make the refreshing frequency of thumbnail lower, can economize on resources expense thus further, and improve the Experience Degree of user further.
Embodiment
Be clearly and completely described technical scheme of the present invention below in conjunction with accompanying drawing, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Originally execute example and provide a kind of method for displaying image, the method can perform in the intelligent terminal (such as smart mobile phone, panel computer) with Presentation Function and data processing function, and as shown in Figure 1, the method comprises the steps:
S1, load the thumbnail of original image, the resolution of this thumbnail is less than original image, and above-mentioned original image can be the high-definition image that data volume is larger.Fig. 2 shows the size of original image and the relation of intelligent terminal display screen, the size of original image 21 is greater than (comprising physical size and resolution) size of display screen 22, original image 21 can be stored in the storage card (hard disk such as embedded memory card, external storage card) of intelligent terminal, in order to economize on resources and be convenient to check, first a breviary Figure 23 can be generated according to raw image data, breviary Figure 23 is preferably dimensioned to be the indication range being less than or equal to display screen 22, is then loaded in mobile phone EMS memory by this breviary Figure 23; For the terminal with display card, can be that this thumbnail is loaded in video memory.
S2, shows above-mentioned breviary Figure 23, and now user can understand the overview of original image by thumbnail, if user needs to check details, can carry out amplifieroperation, such as, on the touch-screen of terminal, carry out amplifying gesture, this operation is a kind of time-continuing process.
S3, when receiving the amplifieroperation to above-mentioned breviary Figure 23, whether monitoring amplifieroperation stops, if stop, performs step S6, if do not stop, performs step S4;
S4, judges whether current multiplication factor reaches preset multiple, if do not reached, returns step S4 and continues to judge, if reached, perform step S5.
S5, when current multiplication factor reaches preset multiple, then generate another thumbnail of original image according to preset multiple, and load and show another thumbnail above-mentioned, the resolution of the thumbnail of wherein current loading is greater than the resolution of last thumbnail.As a preferred version, after a up-to-date thumbnail is loaded, previous thumbnail can be discharged from internal memory, device resource can be saved further thus.
The such as multiple of above-mentioned breviary Figure 23 is 1 times, first preset multiple is 1.5 times, then when thumbnail to be amplified 1.5 times by dissolute operation, generate according to raw image data, load (being loaded in internal memory or video memory) and show second breviary Figure 24, the resolution of second breviary Figure 24 is 1.5 times of the resolution of breviary Figure 23, user can see the more details of original image by second breviary Figure 24, and now can discharge breviary Figure 23.Size due to second breviary Figure 24 may be greater than the size of display screen 22, so the side-play amount that can cause according to amplifieroperation shows a part of second breviary Figure 24, user can move second breviary Figure 24 to check the part that acquiescence does not show.
Above-mentioned preset multiple is preferably multiple, and multiple preset multiple is determined before can generating thumbnail.Step-length between preset multiple will affect image refreshing (generate, load and display thumbnail) frequency, the less then refreshing frequency of step-length is higher, user can be made thus to see the thumbnail that more resolution is different successively, but also can increase resource overhead; The larger then resource overhead of step-length is less, but can reduce user experience.
According to the method for displaying image that the embodiment of the present invention provides, user can by generating according to original image at first, to load and the thumbnail shown checks the overview of original image, and can amplify the carrying out of initial thumbnail, in amplification process, whether the current amplifieroperation of Real-Time Monitoring reaches default multiplication factor, regenerate at once when reaching default multiplication factor, load another thumbnail that also display resolution is higher, internal memory can be saved thus when showing image, the resources such as video memory, and make user see the thumbnail that multiple resolution is different successively in the process be exaggerated at thumbnail.
S6, generates another thumbnail of above-mentioned original image according to current multiplication factor, such as, when amplifieroperation stops be 1.8 times to the multiplication factor of above-mentioned breviary Figure 23, then generate the final breviary Figure 25 being of a size of 1.8 times of breviary Figure 23.Final thumbnail can be accurately generated thus according to multiplication factor during user's shut-down operation.
As a preferred scheme, the relation of above-mentioned multiple preset multiple can be S
n=(S
n-1– S
n-2) * m+S
n-1, wherein n>=2, S
nfor next preset multiple, S
n-1for last preset multiple, S
1=S
0+ N, S
0=1, N, m are positive number, 0≤N≤1, m>=1.
Particularly, S
0the multiple of initial thumbnail, S
1s
nfor n preset multiple (S
1s
nall be greater than 1), N is conversion difference, and m is conversion coefficient.Such as N=0.2, m=2, then S
1=1.2, S
2=1.6, S
3=2.4, namely when the multiplication factor indicated by amplifieroperation reaches 1.2, then generate another thumbnail that resolution is 1.2 of initial thumbnail, when the multiplication factor indicated by amplifieroperation reaches 1.6, then generate another thumbnail that resolution is 1.6 of initial thumbnail, when the multiplication factor indicated by amplifieroperation reaches 2.4, then generate another thumbnail of 2.4 times that a resolution is initial thumbnail.
According to multiple preset multiple of above-mentioned preferred version, can, when multiplication factor is less, make the refreshing frequency of thumbnail higher; When multiplication factor is larger, make the refreshing frequency of thumbnail lower, can economize on resources expense thus further, and improve the Experience Degree of user further.
An alternative embodiment of the invention also provides a kind of image display device, and this device comprises as shown in Figure 3:
Loading unit 31, for loading the thumbnail of original image, the resolution of described thumbnail is less than described original image;
Display unit 32, for showing described thumbnail;
Whether monitoring means 33, for when receiving the amplifieroperation to described thumbnail, monitoring described amplifieroperation and stopping;
Refresh unit 34, for when described amplifieroperation does not stop, when current multiplication factor reaches preset multiple, another thumbnail of described original image is generated according to described preset multiple, load another thumbnail described, and display another thumbnail described, the resolution of the thumbnail of wherein current loading is greater than the resolution of last thumbnail.Preferably, described preset multiple can be multiple.
According to the image display device that the embodiment of the present invention provides, user can by generating according to original image at first, to load and the thumbnail shown checks the overview of original image, and can amplify the carrying out of initial thumbnail, in amplification process, whether the current amplifieroperation of Real-Time Monitoring reaches default multiplication factor, regenerate at once when reaching default multiplication factor, load another thumbnail that also display resolution is higher, internal memory can be saved thus when showing image, the resources such as video memory, and make user see the thumbnail that multiple resolution is different successively in the process be exaggerated at thumbnail.
Preferably, said apparatus also comprises: the second refresh unit 35, for when described amplifieroperation stops, generates another thumbnail of described original image according to current multiplication factor.Final thumbnail can be accurately generated thus according to multiplication factor during user's shut-down operation.
Preferably, said apparatus also comprises: releasing unit 36, and for after another thumbnail described in described loading, the last thumbnail that release loads, can save device resource thus further.
Preferably, the pass of described multiple preset multiple is Sn=(Sn-1 – Sn-2) * m+Sn-1, wherein n >=2, and Sn is next preset multiple, and Sn-1 is last preset multiple, and S1=S0+N, S0=1, N, m are positive number, 0≤N≤1, m >=1.According to multiple preset multiple of above-mentioned preferred version, can, when multiplication factor is less, make the refreshing frequency of thumbnail higher; When multiplication factor is larger, make the refreshing frequency of thumbnail lower, can economize on resources expense thus further, and improve the Experience Degree of user further.
Obviously, above-described embodiment is only for clearly example being described, and the restriction not to execution mode.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here exhaustive without the need to also giving all execution modes.And thus the apparent change of extending out or variation be still among the protection range of the invention.