CN106681667B - Picture display method and device and mobile terminal - Google Patents

Picture display method and device and mobile terminal Download PDF

Info

Publication number
CN106681667B
CN106681667B CN201710013458.4A CN201710013458A CN106681667B CN 106681667 B CN106681667 B CN 106681667B CN 201710013458 A CN201710013458 A CN 201710013458A CN 106681667 B CN106681667 B CN 106681667B
Authority
CN
China
Prior art keywords
thumbnail
pixel value
loading
memory
picture
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.)
Active
Application number
CN201710013458.4A
Other languages
Chinese (zh)
Other versions
CN106681667A (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.)
Beijing Anyun Century Technology Co Ltd
Original Assignee
Beijing Anyun Century 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 Beijing Anyun Century Technology Co Ltd filed Critical Beijing Anyun Century Technology Co Ltd
Priority to CN201710013458.4A priority Critical patent/CN106681667B/en
Publication of CN106681667A publication Critical patent/CN106681667A/en
Application granted granted Critical
Publication of CN106681667B publication Critical patent/CN106681667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a picture display method, a picture display device and a mobile terminal, wherein the method comprises the following steps: after receiving a trigger operation for loading the thumbnail of the designated picture library, acquiring the thumbnail of a first pixel value corresponding to an original picture aiming at the original picture without the thumbnail loaded in the designated picture library and loading the thumbnail to an internal memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The problem of the memory that occupies great that the definition of the thumbnail is better leads to is solved, the beneficial effect of saving the memory while guaranteeing the definition of the picture thumbnail is obtained.

Description

Picture display method and device and mobile terminal
Technical Field
The invention relates to the technical field of computers, in particular to a picture display method and device and a mobile terminal.
Background
Today, with the rapid development of the electronic information industry, photographing has become a matter that people can do anytime and anywhere, so that a large number of pictures can be stored on a device with functions of storing and displaying the pictures, such as a computer, a mobile phone and the like. When a user needs to find a target picture from a large number of pictures, the user often previews the picture in a thumbnail mode, so that the target picture is found.
In the prior art, in order to make the display of the thumbnails smoother when the user requests to view more thumbnails, the thumbnail is often loaded more than several times of the number of thumbnails displayable on the screen at a time. As shown in fig. 1, there are a total of 48 pictures in the picture library of the current folder. If the screen can only display the thumbnails of 12 pictures at one time, the thumbnails of the previous 36 pictures or even 48 pictures are directly loaded during one-time loading. If the pictures displayed on the screen include thumbnails of the 1 st to 12 th pictures, the user requests to view the thumbnails of the 13 th to 24 th pictures through operations such as pulling down a sliding bar, and at this time, the thumbnails of the 13 th to 24 th pictures can be directly displayed on the screen without causing time delay.
It can be seen that, if the thumbnail of each picture has a larger size, the method for loading the thumbnail occupies a larger memory; on the contrary, if the thumbnail of each picture is of a smaller size, the definition of the thumbnail will be affected, and the purpose of previewing the picture cannot be achieved. Therefore, the method for loading the thumbnail cannot save the memory while ensuring the definition of the thumbnail.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a picture presentation method, apparatus and mobile terminal that solve the above problems or at least partially solve the above problems.
According to a first aspect of the present invention, a picture displaying method is disclosed, comprising: after receiving a trigger operation for loading the thumbnail of the designated picture library, acquiring the thumbnail of a first pixel value corresponding to an original picture aiming at the original picture without the thumbnail loaded in the designated picture library and loading the thumbnail to an internal memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The method has the beneficial effect that the memory can be saved while the definition of the picture thumbnail is ensured.
With reference to the first aspect, in a first implementation manner of the first aspect, when the triggering operation for loading the thumbnail of the specified picture library is an opening operation of a thumbnail display page by a user, the step of acquiring, after receiving the triggering operation for loading the thumbnail of the specified picture library, the thumbnail corresponding to the first pixel value of the original picture and loading the thumbnail to the memory with respect to the original picture in which the thumbnail is not loaded in the specified picture library includes: judging whether the number of original pictures in the appointed picture library is larger than the number of display positions of a screen visual area or not; if the number of the original pictures is larger than the number of display positions of a screen visual area, acquiring thumbnails corresponding to first pixel values of the original pictures and loading the thumbnails into a memory; and if the number of the original pictures is not larger than the number of the display positions of the screen visual area, acquiring thumbnails of second pixel values of the original pictures, loading the thumbnails of the second pixel values to a memory, and displaying the thumbnails of the second pixel values in the screen visual area. The method has the advantage that the thumbnail can be flexibly loaded according to the number of the original pictures.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the step of obtaining a thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail into a memory includes: and acquiring a first page and a thumbnail of a first pixel value of the original picture within the specified page number after the first page, and loading the thumbnail to the memory. The thumbnail loading method has the advantage that the thumbnails can be loaded in batches.
With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, when the trigger operation for loading the thumbnail of the specified picture library is a sliding operation of a user in a displayed thumbnail display page, after the trigger operation for loading the thumbnail of the specified picture library is received, for an original picture in which the thumbnail is not loaded in the specified picture library, a step of obtaining the thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to a memory includes: and acquiring a thumbnail of a first pixel value of an original picture and loading the thumbnail to a memory aiming at the original picture which is not loaded in the specified pages before and after a first page where the thumbnail displayed in the screen visible area is located. There is an advantageous effect that the thumbnail can be updated according to the sliding operation.
With reference to the first aspect, in a fourth implementation manner of the first aspect, after the step of displaying, in a viewable area of a screen, the thumbnail of the corresponding first pixel value in place of the thumbnail of the second pixel value, the method further includes: after the sliding operation is received in the displayed thumbnail display page, when the thumbnail of the second pixel value slides out of the visual area of the screen, the thumbnail of the second pixel value in the memory is deleted, and the corresponding thumbnail of the first pixel value is reloaded. The method has the advantage that the memory can be saved by deleting the slide-out screen thumbnail.
With reference to the first aspect, in a fifth implementation manner of the first aspect, after the step of displaying, in a viewable area of a screen, the thumbnail of the corresponding first pixel value in place of the thumbnail of the second pixel value, the method further includes: and after the sliding operation is received in the displayed thumbnail display page, when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area, deleting the thumbnail of the second pixel value in the memory, and reloading the corresponding thumbnail of the first pixel value. There is an advantageous effect that the thumbnail of the second pixel value can be deleted when the thumbnail part of the second pixel value moves out of the screen.
With reference to the fourth or fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, after the step of reloading the thumbnail of the corresponding first pixel value, the method further includes: judging whether the distance between the position of the thumbnail of the first pixel value shifted out of the screen visual area and the screen visual area exceeds a specified distance threshold value or not; and if so, deleting the thumbnail of the first pixel value from the memory. The method has the advantages that the thumbnail of the first pixel value can be deleted flexibly, and therefore memory consumption is reduced.
With reference to the third implementation manner of the first aspect, in a seventh implementation manner of the first aspect, after the step of obtaining, for an original picture that is not yet loaded within a specified number of pages before and after a first page where a thumbnail displayed in a screen visible area is located, a thumbnail of a first pixel value of the original picture and loading the thumbnail to a memory, the method further includes: and after the sliding operation is received in the displayed thumbnail display page, deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed page number. The method has the advantage that the memory can be saved by deleting the slide-out screen thumbnail.
With reference to the first aspect, in an eighth implementation manner of the first aspect, before the step of obtaining, for an original picture in which a thumbnail is not loaded in a specified picture library, a thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to a memory after receiving a trigger operation for loading a thumbnail of the specified picture library, the method further includes: after an original picture newly stored in the mobile terminal is scanned, a thumbnail of a first pixel value of the original picture is obtained and stored in an appointed cache folder. There is an advantageous effect that a thumbnail of the first pixel value can be generated for the newly generated original picture increment.
With reference to the eighth implementation manner of the first aspect, in a ninth implementation manner of the first aspect, the step of obtaining, for an original picture in which a thumbnail is not loaded in a specified picture library, a thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to a memory after receiving a trigger operation for loading a thumbnail of the specified picture library includes: after receiving a trigger operation for loading the thumbnail of the designated picture library, for the original picture without the thumbnail loaded in the designated picture library, reading the thumbnail corresponding to the first pixel value of the original picture from the designated cache folder and loading the thumbnail to the memory. There is an advantageous effect that the thumbnail of the newly generated first pixel value can be incrementally loaded.
With reference to the first aspect, in a tenth implementation manner of the first aspect, the step of obtaining, for an original picture corresponding to a thumbnail displaying a first pixel value in a visual area of a screen, a thumbnail corresponding to a second pixel value of the original picture and loading the thumbnail into a memory includes: calling a drawable object interface function to obtain a drawable object of an original picture by taking the original picture as a source file; calling a bitmap object interface function to extract a bitmap object from the drawable object; and creating a thumbnail of a second pixel value by using the bitmap object and loading the thumbnail to a memory. There is an advantageous effect that a thumbnail of the second pixel value can be directly created using an existing interface.
According to a second aspect of the present invention, there is disclosed a picture displaying apparatus comprising: the thumbnail loading module of the first pixel value is used for acquiring a thumbnail of the first pixel value corresponding to an original picture and loading the thumbnail to a memory aiming at the original picture without the thumbnail loaded in the appointed picture library after receiving the trigger operation of loading the thumbnail of the appointed picture library; the first pixel value thumbnail display module is used for displaying a thumbnail of a first pixel value which needs to be displayed in a screen visual area in the memory; the second pixel value thumbnail loading module is used for acquiring a thumbnail of a second pixel value corresponding to an original picture corresponding to the thumbnail of the first pixel value displayed in the screen visible area and loading the thumbnail to the memory; the second pixel value is greater than the first pixel value; and the second pixel value thumbnail display module is used for replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visible area of the screen. The method has the beneficial effect that the memory can be saved while the definition of the picture thumbnail is ensured.
With reference to the second aspect, in a first implementation manner of the second aspect, when the trigger operation for loading the thumbnail of the specified picture library is an opening operation of a thumbnail display page by a user, the first pixel value thumbnail loading module includes: the original picture quantity judging submodule is used for judging whether the quantity of the original pictures in the appointed picture library is larger than the quantity of display positions of the screen visual area or not; the first pixel value thumbnail loading sub-module is used for acquiring thumbnails corresponding to the first pixel values of the original pictures and loading the thumbnails into a memory if the number of the original pictures is larger than the number of display positions of a screen visual area; and the second pixel value thumbnail loading sub-module is used for acquiring and loading the thumbnails of the second pixel values of the original pictures into a memory and displaying the thumbnails of the second pixel values in the screen visual area if the number of the original pictures is not more than the number of the display positions of the screen visual area. The method has the advantage that the thumbnail can be flexibly loaded according to the number of the original pictures.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the present invention provides that the first pixel value thumbnail loads the sub-module, including: and the first pixel value thumbnail loading unit is used for acquiring thumbnails of the first pixel values of the original pictures in the first page and the designated number of pages after the first page and loading the thumbnails to the memory. The thumbnail loading method has the advantage that the thumbnails can be loaded in batches.
With reference to the second implementation manner of the second aspect, in a third implementation manner of the second aspect, when the trigger operation for loading the thumbnail of the specified picture library is a sliding operation of a user in a displayed thumbnail display page, the first pixel value thumbnail loading module includes: and the thumbnail loading sub-module of the first pixel value of the appointed page number is used for acquiring the thumbnail of the first pixel value of the original picture and loading the thumbnail to the memory aiming at the original picture which is not loaded in the appointed page number before and after the first page of the thumbnail displayed in the screen visible area. There is an advantageous effect that the thumbnail can be updated according to the sliding operation.
With reference to the second aspect, in a fourth implementation manner of the second aspect, after the second pixel value thumbnail display module, the method further includes: and the first deleting module is used for deleting the thumbnail of the second pixel value in the memory and reloading the corresponding thumbnail of the first pixel value when the thumbnail of the second pixel value slides out of the screen visible area after the sliding operation is received in the displayed thumbnail display page. The method has the advantage that the memory can be saved by deleting the slide-out screen thumbnail.
With reference to the second aspect, in a fifth implementation manner of the second aspect, after the second pixel value thumbnail display module, the method further includes: and the second deleting module is used for deleting the thumbnail of the second pixel value in the memory and reloading the corresponding thumbnail of the first pixel value when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area after the sliding operation is received in the displayed thumbnail display page. There is an advantageous effect that the thumbnail of the second pixel value can be deleted when the thumbnail part of the second pixel value moves out of the screen.
With reference to the fourth or fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect, after the second deleting module, the method further includes: the moving-out distance judging module is used for judging whether the distance between the position of the thumbnail of the first pixel value of the moving-out screen visual area and the screen visual area exceeds a specified distance threshold value or not; and the third deleting module is used for deleting the thumbnail of the first pixel value from the memory if the number of the thumbnail exceeds the number of the first pixel value. The method has the advantages that the thumbnail of the first pixel value can be deleted flexibly, and therefore memory consumption is reduced.
With reference to the third implementation manner of the second aspect, in a seventh implementation manner of the second aspect, after the loading of the sub-module on the first pixel value thumbnail of the specified number of pages, the method further includes: and the fourth deleting submodule is used for deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed number of pages after the sliding operation is received in the displayed thumbnail display page. The method has the advantage that the memory can be saved by deleting the slide-out screen thumbnail.
With reference to the second aspect, in an eighth implementation manner of the second aspect, before the first pixel value thumbnail loading module, the method further includes: and the first pixel value thumbnail updating module is used for acquiring a thumbnail of a first pixel value of the original picture and storing the thumbnail into the designated cache folder after the original picture newly stored in the mobile terminal is scanned. There is an advantageous effect that a thumbnail of the first pixel value can be generated for the newly generated original picture increment.
With reference to the eighth implementation manner of the second aspect, in a ninth implementation manner of the second aspect, the present invention provides that the first pixel value thumbnail loading module includes: and the first pixel value thumbnail updating and loading sub-module is used for reading the thumbnail of the first pixel value corresponding to the original picture from the specified cache folder and loading the thumbnail to the memory aiming at the original picture of which the thumbnail is not loaded in the specified picture library after receiving the trigger operation of loading the thumbnail of the specified picture library. There is an advantageous effect that the thumbnail of the newly generated first pixel value can be incrementally loaded.
With reference to the second aspect, in a tenth implementation manner of the second aspect, the second pixel value thumbnail loading module includes: the drawable object acquisition submodule is used for calling a drawable object interface function to take an original picture as a source file and acquiring a drawable object of the original picture; the bitmap object extraction submodule is used for calling a bitmap object interface function to extract a bitmap object from the drawable object; and the second pixel value thumbnail creating sub-module is used for creating a thumbnail of the second pixel value by using the bitmap object and loading the thumbnail to the memory. There is an advantageous effect that a thumbnail of the second pixel value can be directly created using an existing interface.
According to a third aspect of the present invention, there is disclosed a mobile terminal comprising a processor and a memory,
the memory is used for storing a program for executing the picture display method;
the processor is configured to execute programs stored in the memory.
According to a fourth aspect of the present invention, a computer storage medium is disclosed for storing computer software instructions for a picture presentation apparatus as described above, comprising instructions for executing a program designed for a picture presentation apparatus as described above.
According to the picture display method, the picture display device and the mobile terminal, after the trigger operation of loading the thumbnail of the appointed picture library is received, the thumbnail of the first pixel value corresponding to the original picture is obtained and loaded to the memory aiming at the original picture without the thumbnail loaded in the appointed picture library; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The problem that the memory occupies a large amount due to the fact that the definition of the thumbnail is good is solved, and therefore the beneficial effect that the memory is saved while the definition of the picture thumbnail is guaranteed is achieved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating the steps of one embodiment of a method for displaying pictures in accordance with the present invention;
FIG. 1A is a diagram illustrating the display of thumbnails within a viewable area of a screen in an embodiment of the present invention;
FIG. 1B is another diagram illustrating the display of a thumbnail image within a viewable area of a screen in an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of another embodiment of a method for presenting pictures in accordance with the present invention;
FIG. 2A is another diagram illustrating the display of a thumbnail within a viewable area of a screen in an embodiment of the present invention;
FIG. 3 is a block diagram illustrating an embodiment of a picture presentation apparatus according to the present invention;
FIG. 4 is a block diagram showing another embodiment of a picture presentation apparatus according to the present invention;
fig. 5 is a block diagram illustrating a partial structure of a cellular phone related to a mobile terminal provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a picture displaying method according to the present invention is shown, which may specifically include the following steps:
step 101, after receiving a trigger operation for loading a thumbnail of a designated picture library, acquiring the thumbnail corresponding to a first pixel value of an original picture and loading the thumbnail to a memory for the original picture without the thumbnail loaded in the designated picture library.
The trigger operation for loading the thumbnail of the designated picture library comprises the following steps: the operation of opening the designated picture library by the user and the sliding operation of requesting the next thumbnail by the user.
A thumbnail of the first pixel value of the original picture may be saved in a cache of the album application.
Specifically, the step of acquiring, for an original picture in which a thumbnail is not loaded in a specified picture library, a thumbnail corresponding to a first pixel value of the original picture includes: firstly, judging whether an original picture without thumbnail loading exists or not according to the number of the original pictures and the number of the thumbnails, if the number of the original pictures is larger than the number of the thumbnails, judging that the original picture without thumbnail loading exists, and if not, judging that the original picture without thumbnail loading does not exist; and then, loading the thumbnail of the first pixel value for the original picture without the thumbnail according to the corresponding relation between the original picture and the thumbnail. The correspondence between the original picture and the thumbnail can be identified by file identification. For example, the file identifications of the original picture and the thumbnail are the same, but are stored in different paths; or the file identification of the thumbnail comprises the file identification of the original picture.
And 102, displaying the thumbnail of the first pixel value which needs to be displayed in the screen visible area in the memory.
Wherein, the thumbnail of the first pixel value required to be displayed in the visual area of the screen comprises: a thumbnail of the first pixel value that can be fully displayed within the screen visible area, a thumbnail of the first pixel value that can be partially displayed within the screen visible area.
As shown in fig. 1A, S is a screen visible area of the mobile terminal, the thumbnails a 11-a 54 can all be displayed completely within the screen visible area, while the thumbnails a 61-a 64 can only be partially displayed within the screen visible area. It is necessary to load not only the thumbnails a11 to a54 but also the thumbnails a61 to a64 when the thumbnail of the first pixel is loaded.
In practical applications, after the user requests the next thumbnail through a sliding operation, a partially displayed thumbnail may also appear above or below the visible area of the screen. As shown in fig. 1B, the thumbnails a 31-a 74 can all be fully displayed in the screen visible region, while the thumbnails a 21-a 24 and a 81-a 84 can only be partially displayed in the screen visible region. It is necessary to load not only the thumbnails a31 to a74 but also the thumbnails a21 to a24 and a81 to a84 when the thumbnail of the first pixel is loaded.
103, acquiring a thumbnail of a second pixel value corresponding to an original picture corresponding to the thumbnail of the first pixel value displayed in the screen visible area and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value.
Wherein the thumbnail of the second pixel value of the original picture may be saved in a cache of the album application. The original picture, the thumbnail file of the first pixel value and the thumbnail file of the second pixel value can be respectively stored in the album application cache under different paths.
It will be appreciated that the thumbnail of the second pixel value is sharper and better in resolution than the thumbnail of the first pixel value.
In practical application, the file of the original picture, the thumbnail file of the first pixel value and the thumbnail file of the second pixel value all have a corresponding relationship, and the file identifier of the original picture can be written into the thumbnail file headers of the first pixel value and the second pixel value.
Specifically, the thumbnail file corresponding to the second pixel value of the original picture may be obtained according to the file identifier of the original picture stored in the thumbnail file header of the first pixel value. And if the original picture file identifier in the thumbnail file header of a second pixel value is consistent with the original picture file identifier in the thumbnail file header of the first pixel value, the thumbnail of the second pixel value is the thumbnail of the second pixel value corresponding to the same original picture as the thumbnail of the first pixel value.
As shown in fig. 1A, thumbnails a11 through a64 of first pixel values are displayed within the screen visible region, so that thumbnails of a11 through a64 corresponding to second pixel values of the original pictures are required.
And 104, replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in a visible area of a screen.
In practical application, the thumbnail of the second pixel value is clearer than that of the first pixel value, so that the thumbnail of the second pixel value has better display effect.
In the embodiment of the invention, after the trigger operation of loading the thumbnail of the appointed picture library is received, aiming at the original picture without the thumbnail loaded in the appointed picture library, the thumbnail of the first pixel value corresponding to the original picture is obtained and loaded to the memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The problem that the memory occupies a large amount due to the fact that the definition of the thumbnail is good is solved, and therefore the beneficial effect that the memory is saved while the definition of the picture thumbnail is guaranteed is achieved.
Referring to fig. 2, a flowchart illustrating steps of another embodiment of a picture displaying method according to the present invention is shown, which may specifically include the following steps:
step 201, after an original picture newly stored in the mobile terminal is scanned, obtaining a thumbnail of a first pixel value of the original picture and storing the thumbnail into an appointed cache folder.
During the process of using the mobile terminal, new pictures may be generated, the new pictures are stored in a system media library of the mobile terminal at regular time, and the photo album application updates the pictures in time.
In the embodiment of the invention, a thumbnail of a first pixel value can be generated for a newly generated original picture increment and stored in a designated folder; and scanning the media library to obtain the time stamp stored in the file header of the picture, and obtaining the newly stored original picture according to the time stamp.
Step 202, after receiving a trigger operation for loading a thumbnail of a designated picture library, for an original picture without the thumbnail loaded in the designated picture library, acquiring the thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to a memory. Step 202 can refer to the detailed description of step 101, which is not described herein.
Optionally, in another embodiment of the present invention, step 202 includes sub-step 2021:
in sub-step 2021, after receiving a trigger operation for loading a thumbnail of a designated picture library, for an original picture in which the thumbnail is not loaded in the designated picture library, reading the thumbnail corresponding to the first pixel value of the original picture from the designated cache folder, and loading the thumbnail to a memory.
Wherein the specified cache folder may be a thumb folder.
Specifically, after the thumbnail corresponding to the first pixel value of the original picture is read from the designated cache folder and loaded into the memory, the designated cache folder may be cleared, so that it is ensured that all thumbnails in the designated cache folder may be directly loaded when the thumbnail corresponding to the first pixel value of the new original picture is loaded next time.
Optionally, in another embodiment of the present invention, when the above-mentioned trigger operation for loading the thumbnail of the specified picture library is an opening operation of the thumbnail presentation page by the user, step 202 includes sub-steps 2022 to 2024:
sub-step 2022, determine whether the number of the original pictures in the designated picture library is greater than the number of the display positions in the visible area of the screen.
In the embodiment of the present invention, the trigger operation for loading the thumbnail of the designated picture library may be an opening operation of the thumbnail display page by the user. The thumbnail display page can be a display page of the album set, the displayed thumbnail is the thumbnail of the album set, and in practical application, one photo in the album set can be selected as the thumbnail of the album set. And when the album set area is clicked on the album set display page, opening the page of the album set, wherein the thumbnail display page can be the display page of the photo. Of course, the thumbnail display page of the present application may be opened in other ways, and the embodiment of the present invention does not limit the page.
The number of the display positions of the screen visual area is the capacity of the screen visual area for displaying the thumbnails, and is related to the size of the screen.
In the embodiment of the invention, the thumbnail can be flexibly loaded according to the number of the original pictures. If the number of the original pictures is smaller, and all the corresponding thumbnails can be completely displayed in the visual area of the screen, loading thumbnails of second pixel values corresponding to all the original pictures at one time; otherwise, a thumbnail of the first pixel value is loaded first, and then a thumbnail of the second pixel value is loaded.
In sub-step 2023, if the number of the original pictures is greater than the number of the display positions of the screen visible region, obtaining a thumbnail corresponding to the first pixel value of the original picture and loading the thumbnail to the memory.
The number of the original pictures is large, all the corresponding thumbnails need to be displayed in a screen visual area in a paging mode, and previous or next thumbnails can be requested through up-down sliding operation of a user.
It is to be understood that the operation of the user requesting the previous or next thumbnail may also be clicking an up-down button, which is not limited by the embodiment of the present invention.
Optionally, in another embodiment of the present invention, the sub-step 2023 includes the sub-step 20231:
in sub-step 20231, a thumbnail of the first pixel value of the original picture within the first page and the specified number of pages after the first page is obtained and loaded to the memory.
The specified number of pages may be set according to a specific application scenario, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, the thumbnails with the first pixel values can be loaded in batch, so that the thumbnails on the upper page and the thumbnails on the lower page can be displayed more smoothly. When the album application is opened, display is started from the first page thumbnail. Thereby batch loading the first page and thumbnails of the first pixel values following the first page.
In the substep 2024, if the number of the original pictures is not greater than the number of the display positions of the screen visual area, obtaining the thumbnails of the second pixel values of the original pictures, loading the thumbnails of the second pixel values into a memory, and displaying the thumbnails of the second pixel values in the screen visual area.
The number of original pictures is small, and all corresponding thumbnails can be displayed in one page in the visual area of the screen. So that a thumbnail of the relatively clear second pixel value can be directly loaded for display.
Wherein, steps 2022 to 2024 are procedures of loading the thumbnail when the trigger operation of loading the thumbnail of the specified picture library is an opening operation of the thumbnail display page by the user.
Optionally, in another embodiment of the present invention, when the above-mentioned trigger operation for loading the thumbnail of the specified picture library is that the user receives a slide operation in the displayed thumbnail display page, step 202 includes sub-step 2025:
in sub-step 2025, for an original picture that has not been loaded within a specified number of pages before and after a first page where a thumbnail displayed in a screen visible area is located, obtaining a thumbnail of a first pixel value of the original picture and loading the thumbnail to a memory.
When a user requests the thumbnails of the upper page and the lower page through sliding operation, the thumbnails of the first pixel values of the original pictures with the front and the back appointed pages corresponding to the current display page are preloaded in batch, and therefore the thumbnails of the upper page and the lower page can be displayed more smoothly.
For example, when the thumbnail of the second pixel value of the first page is currently displayed, the thumbnails of the first pixel values of the pages 2 and 3 are preloaded, and when the user slides down to display the thumbnail of the page 2, the thumbnail of the first pixel value of the page 4 is continuously preloaded, and so on.
In practical application, only thumbnails of the first pixel values of the specified pages before and after the current page are reserved at a time, and thumbnails exceeding the specified pages are deleted, for example, the 5 th page currently displayed is deleted, and only thumbnails of the 3 rd and 4 th pages and thumbnails of the 6 th and 7 th pages are reserved. When the user slides upwards and the thumbnail of the 4 th page is displayed, the thumbnail of the 2 nd page is preloaded, and the thumbnail of the 7 th page can be deleted. When the user slides upwards and the thumbnail of the page 6 is displayed, the thumbnail of the page 8 is preloaded, and the thumbnail of the page 3 can be deleted.
And the current display page is the first page where the thumbnail displayed in the screen visible area is located.
In practical applications, at least one of the two processes for loading the thumbnail corresponding to steps 201 to 203 and 204 may be executed.
Sub-step 2025 is a process of loading a thumbnail when the trigger operation for loading a thumbnail of a specified picture library is a slide operation by the user in the displayed thumbnail presentation page. Optionally, in another embodiment of the present invention, after the sub-step 2025, the method further comprises a sub-step 2026:
in sub-step 2026, after the sliding operation is received in the displayed thumbnail display page, the thumbnail of the first pixel value of the page whose memory distance from the thumbnail of the second pixel value displayed in the visual area of the screen exceeds the designated number of pages is deleted.
The number of designated pages may be set according to an actual application scenario, and may be the same as or different from the number of designated pages when the thumbnail of the first pixel is loaded. The embodiments of the present invention do not limit them.
In practical application, when a user requests a next page of thumbnail through sliding operation, deleting the thumbnail of a first pixel value sliding out of a visual area of a screen from the upper part of a memory; and when the user requests the thumbnail of the second pixel value of the previous page through the sliding operation, deleting the thumbnail of the first pixel sliding out of the visual area of the screen from the lower part of the memory.
As shown in fig. 1B, thumbnails a21 through a84 of second pixel values are displayed within the screen visible region, and at this time, thumbnails of first pixel values stored in the memory include a21 through a 104. After the user requests the thumbnail of the previous page through the slide operation, as shown in fig. 1A, thumbnails a11 to a74 of second pixel values are displayed within the screen visible region. At this time, in order to save memory, the thumbnail images a91 to a104 of the first pixel value of the specified number of pages below the thumbnail image a84 of the second pixel value stored in memory are deleted.
Step 203, displaying the thumbnail of the first pixel value which needs to be displayed in the screen visible area in the memory.
This step is described in detail with reference to step 102, and will not be described herein again.
Step 204, aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, obtaining a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to a memory; the second pixel value is greater than the first pixel value.
This step is described in detail with reference to step 103, and is not repeated herein.
Optionally, in another embodiment of the present invention, step 204 comprises sub-steps 2041 to 2043:
substep 2041, calling a drawable object interface function to use the original picture as a source file, and obtaining a drawable object of the original picture.
In practical applications, when a drawable object is obtained, a file corresponding to an original picture is often required to be compressed.
In the android system, the Drawable object interface function, such as the getResources (). getDrawable () function, then obtains the Drawable object of the source file, such as a Drawable object.
Substep 2042, call bitmap object interface function to extract bitmap object from said drawable object.
In the android system, the Drawable object interface function, such as the getblitmap () function, takes as input a Drawable object from which a Bitmap object, such as a Bitmap object, is extracted.
Bitmap objects represent pictures using pixels, each pixel being assigned a particular position and color value.
The bitmap object is related to resolution, and the bitmap object contains a fixed number of pixels. Therefore, if the bitmap object is scaled at a high scaling rate on the screen or printed at a lower resolution than when created, picture details are lost and jaggies appear.
And a substep 2043 of creating a thumbnail of the second pixel value using the bitmap object and loading the thumbnail to a memory.
Specifically, a thumbnail of the second pixel value is created from the bitmap object according to the width and height to which the second pixel value corresponds. Where width and height are both expressed in terms of the number of pixel values.
In the android system, a thumbnail generation interface function such as thumbnail utility, extractthumbnail (bitmap, x, y) may be called to generate a thumbnail, where bitmap is a bitmap object, and x and y are the width and height of the thumbnail.
And step 205, replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visible area of the screen.
This step is described in detail with reference to step 104, and will not be described herein.
Step 206, after the sliding operation is received in the displayed thumbnail display page, when the thumbnail of the second pixel value slides out of the screen visible area, deleting the thumbnail of the second pixel value in the memory, and reloading the corresponding thumbnail of the first pixel value. In practical application, when a user requests a next thumbnail through a sliding operation, the original thumbnail of the second pixel value displayed at the top can slide out of the visible area of the screen; when the user requests the thumbnail of the second pixel value of the previous page through the sliding operation, the thumbnail of the second pixel originally displayed at the lowest position slides out of the screen visible area.
Wherein sliding out of the screen viewable area comprises: the thumbnail slides completely out of the screen view area and the thumbnail partially slides out of the screen view area. As shown in fig. 1A, thumbnails a11 to a14 of second pixels are displayed uppermost in the visible region of the screen. After the user requests the next thumbnail by the slide-down operation, as shown in fig. 1B, the thumbnails a11 through a14 slide out of the screen visible area completely. At this time, in order to save memory, the thumbnails a11 to a14 of the second pixel values stored in the memory are deleted.
Step 207, after the sliding operation is received in the displayed thumbnail display page, when the predetermined proportion of the thumbnail of the second pixel value slides out of the screen visible area, deleting the thumbnail of the second pixel value in the memory, and reloading the corresponding thumbnail of the first pixel value.
It is understood that the predetermined ratio may be set according to an actual application scenario, and the embodiment of the present invention is not limited thereto.
If fig. 1B is the display result of fig. 1A after the user requests the thumbnail of the next page through the downward sliding operation, the thumbnails a21 through a24 partially slide out of the screen visible area. At this time, it means that the user does not substantially look at the picture, and in order to save memory, the thumbnails a21 to a24 of the second pixel values stored in the memory are deleted, and then the corresponding thumbnail of the first pixel value is reloaded, so that the thumbnail of the first pixel value is initially presented when the user slides, and the user is prevented from feeling that the thumbnail is slowly loaded.
On the contrary, if fig. 1A is the display result of fig. 1B after the user requests the previous thumbnail by the upward sliding operation, the thumbnails a81 through a84 partially slide out of the screen visible area. At this time, in order to save memory, the thumbnails a81 to a84 of the second pixel values stored in the memory are deleted.
In step 208, it is determined whether the distance between the position of the thumbnail of the first pixel value moving out of the screen visual area and the screen visual area exceeds a specified distance threshold.
The specified distance threshold may be set according to an actual application scenario, and is not limited in the embodiment of the present invention.
Specifically, the distance from the screen visible area to the position of the thumbnail of the first pixel value shifted out of the screen visible area may be represented by the number of rows of the thumbnail.
In the embodiment of the invention, the aim of saving the memory is fulfilled by deleting the thumbnail of part of the first pixel values. Meanwhile, in order to ensure the continuity of the sliding operation, the thumbnail of the first pixel farther from the thumbnail of the currently displayed second pixel value is deleted.
And step 209, if yes, deleting the thumbnail of the first pixel value from the memory.
As shown in fig. 2A, if the distance threshold is designated as 2, the thumbnails of the second pixel values, which are fully displayed in the screen visible region, are a41 through a43, a51 through a53, a61 through a63, a71 through a73, the thumbnails of the first pixel values, a11 through a13, and a101 and later, may be deleted.
In the embodiment of the invention, after the trigger operation of loading the thumbnail of the appointed picture library is received, aiming at the original picture without the thumbnail loaded in the appointed picture library, the thumbnail of the first pixel value corresponding to the original picture is obtained and loaded to the memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The problem that the memory occupies a large amount due to the fact that the definition of the thumbnail is good is solved, and therefore the beneficial effect that the memory is saved while the definition of the picture thumbnail is guaranteed is achieved. In addition, the embodiment of the invention can further save the memory by deleting the thumbnail sliding out of the display area.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a picture display device according to an embodiment of the present invention is shown, which may specifically include the following modules:
the first pixel value thumbnail loading module 301 is configured to, after receiving a trigger operation for loading a thumbnail of a specified picture library, acquire, for an original picture in the specified picture library, where the thumbnail is not loaded, a thumbnail corresponding to a first pixel value of the original picture, and load the thumbnail to an internal memory.
A first pixel value thumbnail display module 302, configured to display a thumbnail of a first pixel value that needs to be displayed in a screen visible area in a memory.
A second pixel value thumbnail loading module 303, configured to, for an original picture corresponding to a thumbnail displaying a first pixel value in the screen visible area, obtain a thumbnail corresponding to a second pixel value of the original picture and load the thumbnail into an internal memory; the second pixel value is greater than the first pixel value.
And a second pixel value thumbnail display module 304, configured to replace the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the screen visible area.
In the embodiment of the invention, after the trigger operation of loading the thumbnail of the appointed picture library is received, aiming at the original picture without the thumbnail loaded in the appointed picture library, the thumbnail of the first pixel value corresponding to the original picture is obtained and loaded to the memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The problem that the memory occupies a large amount due to the fact that the definition of the thumbnail is good is solved, and therefore the beneficial effect that the memory is saved while the definition of the picture thumbnail is guaranteed is achieved.
Referring to fig. 4, a block diagram of another embodiment of a picture displaying apparatus according to the present invention is shown, which may specifically include the following modules:
the first pixel value thumbnail updating module 401 is configured to, after an original picture newly stored in the mobile terminal is scanned, obtain a thumbnail of a first pixel value of the original picture and store the thumbnail in an assigned cache folder.
The first pixel value thumbnail loading module 402 is configured to, after receiving a trigger operation for loading a thumbnail of a specified picture library, obtain, for an original picture in the specified picture library, to which the thumbnail is not loaded, a thumbnail corresponding to a first pixel value of the original picture, and load the thumbnail to a memory.
A first pixel value thumbnail display module 403, configured to display a thumbnail of a first pixel value that needs to be displayed in a screen visible area in the memory.
A second pixel value thumbnail loading module 404, configured to, for an original picture corresponding to a thumbnail displaying a first pixel value in the screen visible area, obtain a thumbnail corresponding to a second pixel value of the original picture and load the thumbnail into an internal memory; the second pixel value is greater than the first pixel value.
And a second pixel value thumbnail display module 405, configured to replace the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the screen visible area.
The first deleting module 406 is configured to delete the thumbnail of the second pixel value in the memory and reload the corresponding thumbnail of the first pixel value when the thumbnail of the second pixel value slides out of the screen visible area after the sliding operation is received in the displayed thumbnail display page.
The second deleting module 407 is configured to delete the thumbnail of the second pixel value in the memory and reload the corresponding thumbnail of the first pixel value when the predetermined proportion of the thumbnail of the second pixel value slides out of the screen visible area after receiving the sliding operation in the displayed thumbnail display page.
A shifting-out distance determining module 408, configured to determine whether a distance between a position of the thumbnail of the first pixel value shifted out of the screen visual area and the screen visual area exceeds a specified distance threshold;
a third deleting module 409, configured to delete the thumbnail of the first pixel value from the memory if the first pixel value exceeds the second pixel value.
Optionally, in another embodiment of the present invention, the first pixel value thumbnail loading module 402 includes:
and the first pixel value thumbnail updating and loading sub-module is used for reading the thumbnail of the first pixel value corresponding to the original picture from the specified cache folder and loading the thumbnail to the memory aiming at the original picture of which the thumbnail is not loaded in the specified picture library after receiving the trigger operation of loading the thumbnail of the specified picture library.
Optionally, in another embodiment of the present invention, when the triggering operation of loading the thumbnail of the specified picture library is an opening operation of a thumbnail display page by a user, the first pixel value thumbnail loading module 402 includes:
and the original picture quantity judging submodule is used for judging whether the quantity of the original pictures in the appointed picture library is greater than the quantity of the display positions of the screen visual area.
And the first pixel value thumbnail loading sub-module is used for acquiring the thumbnails corresponding to the first pixel values of the original pictures and loading the thumbnails into the memory if the number of the original pictures is greater than the number of the display positions of the screen visual area.
And the second pixel value thumbnail loading sub-module is used for acquiring and loading the thumbnails of the second pixel values of the original pictures into a memory and displaying the thumbnails of the second pixel values in the screen visual area if the number of the original pictures is not more than the number of the display positions of the screen visual area.
Optionally, in another embodiment of the present invention, the above-mentioned first pixel value thumbnail loading sub-module includes:
and the first pixel value thumbnail loading unit is used for acquiring thumbnails of the first pixel values of the original pictures in the first page and the designated number of pages after the first page and loading the thumbnails to the memory.
Optionally, in another embodiment of the present invention, when the triggering operation of the thumbnail loading of the specified picture library is a sliding operation of a user in a displayed thumbnail display page, the first pixel value thumbnail loading module 402 includes:
and the thumbnail loading sub-module of the first pixel value of the appointed page number is used for acquiring the thumbnail of the first pixel value of the original picture and loading the thumbnail to the memory aiming at the original picture which is not loaded in the appointed page number before and after the first page of the thumbnail displayed in the screen visible area.
Optionally, in another embodiment of the present invention, after the loading of the sub-module on the first pixel value thumbnail of the specified page number, the method further includes:
and the fourth deleting submodule is used for deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed number of pages after the sliding operation is received in the displayed thumbnail display page.
Optionally, in another embodiment of the present invention, the second pixel value thumbnail loading module 404 includes:
and the drawable object acquisition submodule is used for calling a drawable object interface function to take the original picture as a source file and acquiring the drawable object of the original picture.
And the bitmap object extraction submodule is used for calling a bitmap object interface function to extract the bitmap object from the drawable object.
And the second pixel value thumbnail creating sub-module is used for creating a thumbnail of the second pixel value by using the bitmap object and loading the thumbnail to the memory.
In the embodiment of the invention, after the trigger operation of loading the thumbnail of the appointed picture library is received, aiming at the original picture without the thumbnail loaded in the appointed picture library, the thumbnail of the first pixel value corresponding to the original picture is obtained and loaded to the memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen. The problem that the memory occupies a large amount due to the fact that the definition of the thumbnail is good is solved, and therefore the beneficial effect that the memory is saved while the definition of the picture thumbnail is guaranteed is achieved. In addition, the embodiment of the invention can further save the memory by deleting the thumbnail sliding out of the display area.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 5 shows only a portion related to the embodiment of the present invention for convenience of description, and please refer to the method portion in the embodiment of the present invention for details that are not disclosed. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of sales), a vehicle-mounted computer, etc., taking the terminal as the mobile phone as an example:
fig. 5 is a block diagram illustrating a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present invention. Referring to fig. 5, the handset includes: radio Frequency (RF) circuit 510, memory 520, input unit 530, display unit 540, sensor 550, audio circuit 560, wireless fidelity (WiFi) module 570, processor 580, and power supply 590. Those skilled in the art will appreciate that the handset configuration shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 5:
the RF circuit 510 may be used for receiving and transmitting signals during a message transmission or call, and in particular, for receiving downlink information of a base station and processing the received downlink information, and for transmitting data designed for uplink to the base station, the RF circuit 510 may include, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (L w noise amplifier, &lttttransmission = L "&ttt/t &gttna), a duplexer, etc. furthermore, the RF circuit 510 may communicate with a network and other devices through wireless communication, which may use any communication standard or protocol, including, but not limited to, a global system for Mobile communication (GSM), a General Packet radio Service (General Packet radio Service, GPRS), a Code Division Multiple Access (Code Division Multiple Access, Wideband CDMA), a Code Division Multiple Access (CDMA), a Short Service Access (SMS Service, L), a long Term Evolution (SMS) message, L, a Service, a Short Service (Service), a WCDMA, a Mobile communication system, a Mobile communication, a wireless.
The memory 520 may be used to store software programs and modules, and the processor 580 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 520. The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532. The touch panel 531, also called a touch screen, can collect touch operations of a user on or near the touch panel 531 (for example, operations of the user on or near the touch panel 531 by using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 531 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 580, and can receive and execute commands sent by the processor 580. In addition, the touch panel 531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 530 may include other input devices 532 in addition to the touch panel 531. In particular, other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 540 may include a display panel 541, and optionally, the display panel 541 may be configured in the form of a liquid crystal display (L required crystal display, &ttttranslation = L "&tttl &ttt/t &gttcd), an Organic light Emitting Diode (Organic L sight-Emitting Diode, O L ED), and the like, and further, the touch panel 531 may cover the display panel 541, and when a touch operation is detected on or near the touch panel 531, the touch panel 531 may be transferred to the processor 580 to determine the type of touch event, and then the processor 580 may provide a corresponding visual output on the display panel 541 according to the type of touch event.
The handset may also include at least one sensor 550, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 541 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 541 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 560, speaker 561, and microphone 562 may provide an audio interface between a user and a cell phone. The audio circuit 560 may transmit the electrical signal converted from the received audio data to the speaker 561, and convert the electrical signal into a sound signal by the speaker 561 for output; on the other hand, the microphone 562 converts the collected sound signals into electrical signals, which are received by the audio circuit 560 and converted into audio data, which are then processed by the audio data output processor 580, and then passed through the RF circuit 510 to be sent to, for example, another cellular phone, or output to the memory 520 for further processing.
WiFi belongs to short distance wireless transmission technology, and the mobile phone can help the user to send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 570, which provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 570, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 580 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 520 and calling data stored in the memory 520, thereby performing overall monitoring of the mobile phone. Alternatively, processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 580.
The handset also includes a power supply 590 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 580 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the embodiment of the present invention, the processor 580 included in the terminal further has the following functions: after receiving a trigger operation for loading the thumbnail of the designated picture library, acquiring the thumbnail of a first pixel value corresponding to an original picture aiming at the original picture without the thumbnail loaded in the designated picture library and loading the thumbnail to an internal memory; displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory; aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value; and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen.
Optionally, the processor 580 also has the following functions: judging whether the number of original pictures in the appointed picture library is larger than the number of display positions of a screen visual area or not; if the number of the original pictures is larger than the number of display positions of a screen visual area, acquiring thumbnails corresponding to first pixel values of the original pictures and loading the thumbnails into a memory; and if the number of the original pictures is not larger than the number of the display positions of the screen visual area, acquiring thumbnails of second pixel values of the original pictures, loading the thumbnails of the second pixel values to a memory, and displaying the thumbnails of the second pixel values in the screen visual area.
Optionally, the processor 580 also has the following functions: and acquiring a first page and a thumbnail of a first pixel value of the original picture within the specified page number after the first page, and loading the thumbnail to the memory.
Optionally, the processor 580 also has the following functions: and acquiring a thumbnail of a first pixel value of an original picture and loading the thumbnail to a memory aiming at the original picture which is not loaded in the specified pages before and after a first page where the thumbnail displayed in the screen visible area is located.
Optionally, the processor 580 also has the following functions: after the sliding operation is received in the displayed thumbnail display page, when the thumbnail of the second pixel value slides out of the visual area of the screen, the thumbnail of the second pixel value in the memory is deleted, and the corresponding thumbnail of the first pixel value is reloaded.
Optionally, the processor 580 also has the following functions: and after the sliding operation is received in the displayed thumbnail display page, when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area, deleting the thumbnail of the second pixel value in the memory, and reloading the corresponding thumbnail of the first pixel value.
Optionally, the processor 580 also has the following functions: judging whether the distance between the position of the thumbnail of the first pixel value shifted out of the screen visual area and the screen visual area exceeds a specified distance threshold value or not; and if so, deleting the thumbnail of the first pixel value from the memory.
Optionally, the processor 580 also has the following functions: and after the sliding operation is received in the displayed thumbnail display page, deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed page number.
Optionally, the processor 580 also has the following functions: after an original picture newly stored in the mobile terminal is scanned, a thumbnail of a first pixel value of the original picture is obtained and stored in an appointed cache folder.
Optionally, the processor 580 also has the following functions: after receiving a trigger operation for loading the thumbnail of the designated picture library, for the original picture without the thumbnail loaded in the designated picture library, reading the thumbnail corresponding to the first pixel value of the original picture from the designated cache folder and loading the thumbnail to the memory.
Optionally, the processor 580 also has the following functions: calling a drawable object interface function to obtain a drawable object of an original picture by taking the original picture as a source file; calling a bitmap object interface function to extract a bitmap object from the drawable object; and creating a thumbnail of a second pixel value by using the bitmap object and loading the thumbnail to a memory.
In the method, the thumbnails displayed in the visual area can be loaded twice respectively, the specified number of the low-resolution thumbnails are loaded and stored for the first time, and the large-resolution thumbnails are loaded for the second time to replace the low-resolution thumbnails and display the low-resolution thumbnails. Therefore, the problem that the memory occupies a large space due to good definition of the thumbnail is solved, and the beneficial effect of saving the memory while ensuring the definition of the thumbnail of the picture is achieved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by hardware that is instructed to implement by a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In summary, the contents of the present disclosure should not be construed as limiting the present disclosure, and a person skilled in the art will readily understand that the present disclosure is not limited to the embodiments and the specific embodiments and the application scope of the present disclosure.
The invention discloses a1 picture display method, which comprises the following steps:
after receiving a trigger operation for loading the thumbnail of the designated picture library, acquiring the thumbnail of a first pixel value corresponding to an original picture aiming at the original picture without the thumbnail loaded in the designated picture library and loading the thumbnail to an internal memory;
displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory;
aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value;
and replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visual area of the screen.
A2, the method according to a1, where when the trigger operation for loading the thumbnail of the specified picture library is an opening operation of a thumbnail display page by a user, and after the trigger operation for loading the thumbnail of the specified picture library is received, for an original picture in which the thumbnail is not loaded in the specified picture library, acquiring the thumbnail corresponding to the first pixel value of the original picture and loading the thumbnail to the memory, the method includes:
judging whether the number of original pictures in the appointed picture library is larger than the number of display positions of a screen visual area or not;
if the number of the original pictures is larger than the number of display positions of a screen visual area, acquiring thumbnails corresponding to first pixel values of the original pictures and loading the thumbnails into a memory;
and if the number of the original pictures is not larger than the number of the display positions of the screen visual area, acquiring thumbnails of second pixel values of the original pictures, loading the thumbnails of the second pixel values to a memory, and displaying the thumbnails of the second pixel values in the screen visual area.
A3, the method as in a2, wherein the step of obtaining a thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail into a memory comprises:
and acquiring a first page and a thumbnail of a first pixel value of the original picture within the specified page number after the first page, and loading the thumbnail to the memory.
A4, the method according to A3, wherein when the trigger operation of loading the thumbnail of the specified picture library is a sliding operation of a user in a displayed thumbnail display page, the step of acquiring, after receiving the trigger operation of loading the thumbnail of the specified picture library, the thumbnail corresponding to the first pixel value of the original picture and loading the thumbnail to the memory with respect to the original picture in which the thumbnail is not loaded in the specified picture library includes:
and acquiring a thumbnail of a first pixel value of an original picture and loading the thumbnail to a memory aiming at the original picture which is not loaded in the specified pages before and after a first page where the thumbnail displayed in the screen visible area is located.
A5, the method as in a1, further comprising, after the step of displaying in a viewable area of the screen in place of the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value:
after the sliding operation is received in the displayed thumbnail display page, when the thumbnail of the second pixel value slides out of the visual area of the screen, the thumbnail of the second pixel value in the memory is deleted, and the corresponding thumbnail of the first pixel value is reloaded.
A6, the method as in a1, further comprising, after the step of displaying in a viewable area of the screen in place of the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value:
and after the sliding operation is received in the displayed thumbnail display page, when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area, deleting the thumbnail of the second pixel value in the memory, and reloading the corresponding thumbnail of the first pixel value.
A7, the method as in a5 or a6, further comprising, after the step of reloading the thumbnail of the respective first pixel value:
judging whether the distance between the position of the thumbnail of the first pixel value shifted out of the screen visual area and the screen visual area exceeds a specified distance threshold value or not;
and if so, deleting the thumbnail of the first pixel value from the memory. A8, the method according to a4, further including, after the step of obtaining, for an original picture that has not been loaded within a specified number of pages before and after a first page where a thumbnail displayed in a screen visible area is located, a thumbnail of a first pixel value of the original picture and loading the thumbnail into a memory:
and after the sliding operation is received in the displayed thumbnail display page, deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed page number.
A9, the method according to a1, further including, before the step of, after the trigger operation for loading thumbnails in the specified picture library is received, for an original picture in the specified picture library in which a thumbnail is not loaded, acquiring a thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to the memory:
after an original picture newly stored in the mobile terminal is scanned, a thumbnail of a first pixel value of the original picture is obtained and stored in an appointed cache folder.
A10, the method according to a9, wherein after receiving a trigger operation for loading a thumbnail of a specified picture library, the step of obtaining, for an original picture in the specified picture library to which the thumbnail is not loaded, the thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to a memory includes:
after receiving a trigger operation for loading the thumbnail of the designated picture library, for the original picture without the thumbnail loaded in the designated picture library, reading the thumbnail corresponding to the first pixel value of the original picture from the designated cache folder and loading the thumbnail to the memory.
A11, the method according to a1, wherein the step of obtaining, for an original picture corresponding to a thumbnail displaying a first pixel value in the screen visible area, a thumbnail corresponding to a second pixel value of the original picture and loading the thumbnail into a memory includes:
calling a drawable object interface function to obtain a drawable object of an original picture by taking the original picture as a source file;
calling a bitmap object interface function to extract a bitmap object from the drawable object;
and creating a thumbnail of a second pixel value by using the bitmap object and loading the thumbnail to a memory.
The invention also discloses B1, a picture display device, comprising:
the thumbnail loading module of the first pixel value is used for acquiring a thumbnail of the first pixel value corresponding to an original picture and loading the thumbnail to a memory aiming at the original picture without the thumbnail loaded in the appointed picture library after receiving the trigger operation of loading the thumbnail of the appointed picture library;
the first pixel value thumbnail display module is used for displaying a thumbnail of a first pixel value which needs to be displayed in a screen visual area in the memory;
the second pixel value thumbnail loading module is used for acquiring a thumbnail of a second pixel value corresponding to an original picture corresponding to the thumbnail of the first pixel value displayed in the screen visible area and loading the thumbnail to the memory; the second pixel value is greater than the first pixel value;
and the second pixel value thumbnail display module is used for replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in the visible area of the screen.
B2, the apparatus according to B1, wherein when the trigger operation for loading thumbnails in a specified picture library is an opening operation of a thumbnail display page by a user, the first pixel value thumbnail loading module includes:
the original picture quantity judging submodule is used for judging whether the quantity of the original pictures in the appointed picture library is larger than the quantity of display positions of the screen visual area or not;
the first pixel value thumbnail loading sub-module is used for acquiring thumbnails corresponding to the first pixel values of the original pictures and loading the thumbnails into a memory if the number of the original pictures is larger than the number of display positions of a screen visual area;
and the second pixel value thumbnail loading sub-module is used for acquiring and loading the thumbnails of the second pixel values of the original pictures into a memory and displaying the thumbnails of the second pixel values in the screen visual area if the number of the original pictures is not more than the number of the display positions of the screen visual area.
B3, the apparatus as in B2, the first pixel value thumbnail loads a sub-module comprising:
and the first pixel value thumbnail loading unit is used for acquiring thumbnails of the first pixel values of the original pictures in the first page and the designated number of pages after the first page and loading the thumbnails to the memory.
B4, the apparatus as described in B3, when the trigger operation for thumbnail loading of the specified picture library is a slide operation of a user in a displayed thumbnail presentation page, then the first pixel value thumbnail loading module includes:
and the thumbnail loading sub-module of the first pixel value of the appointed page number is used for acquiring the thumbnail of the first pixel value of the original picture and loading the thumbnail to the memory aiming at the original picture which is not loaded in the appointed page number before and after the first page of the thumbnail displayed in the screen visible area.
B5, the apparatus of B1, following the second pixel value thumbnail display module, further comprising:
and the first deleting module is used for deleting the thumbnail of the second pixel value in the memory and reloading the corresponding thumbnail of the first pixel value when the thumbnail of the second pixel value slides out of the screen visible area after the sliding operation is received in the displayed thumbnail display page.
B6, the apparatus of B1, following the second pixel value thumbnail display module, further comprising:
and the second deleting module is used for deleting the thumbnail of the second pixel value in the memory and reloading the corresponding thumbnail of the first pixel value when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area after the sliding operation is received in the displayed thumbnail display page.
B7, the apparatus as described in B5 or B6, further comprising, after the second deletion module:
the moving-out distance judging module is used for judging whether the distance between the position of the thumbnail of the first pixel value of the moving-out screen visual area and the screen visual area exceeds a specified distance threshold value or not;
and the third deleting module is used for deleting the thumbnail of the first pixel value from the memory if the number of the thumbnail exceeds the number of the first pixel value.
B8, the apparatus as in B4, further comprising, after the loading of the sub-module by the first pixel-value thumbnail for the specified number of pages:
and the fourth deleting submodule is used for deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed number of pages after the sliding operation is received in the displayed thumbnail display page.
B9, the apparatus as in B1, further comprising, prior to the first pixel value thumbnail loading module:
and the first pixel value thumbnail updating module is used for acquiring a thumbnail of a first pixel value of the original picture and storing the thumbnail into the designated cache folder after the original picture newly stored in the mobile terminal is scanned.
B10, the apparatus as in B9, the first pixel value thumbnail loading module comprising:
and the first pixel value thumbnail updating and loading sub-module is used for reading the thumbnail of the first pixel value corresponding to the original picture from the specified cache folder and loading the thumbnail to the memory aiming at the original picture of which the thumbnail is not loaded in the specified picture library after receiving the trigger operation of loading the thumbnail of the specified picture library.
B11, the apparatus as in B1, the second pixel value thumbnail loading module comprising:
the drawable object acquisition submodule is used for calling a drawable object interface function to take an original picture as a source file and acquiring a drawable object of the original picture;
the bitmap object extraction submodule is used for calling a bitmap object interface function to extract a bitmap object from the drawable object;
and the second pixel value thumbnail creating sub-module is used for creating a thumbnail of the second pixel value by using the bitmap object and loading the thumbnail to the memory.
The invention also discloses C1, a mobile terminal, comprising a processor and a memory,
the memory for storing a program for executing the picture showing method of any one of A1-A11;
the processor is configured to execute programs stored in the memory.

Claims (21)

1. A picture display method is characterized by comprising the following steps:
when receiving a trigger operation of loading the thumbnails of the designated picture library, and the trigger operation of loading the thumbnails of the designated picture library is an opening operation of a user on a thumbnail display page, judging whether the number of original pictures in the designated picture library is larger than the number of display positions of a screen visual area or not;
if the number of the original pictures in the appointed picture library is larger than the number of the display positions of the screen visual area, acquiring a thumbnail corresponding to a first pixel value of the original picture aiming at the original picture without the thumbnail loaded in the appointed picture library and loading the thumbnail to an internal memory;
displaying a thumbnail of a first pixel value which needs to be displayed in a screen visible area in a memory;
aiming at an original picture corresponding to the thumbnail displaying the first pixel value in the screen visible area, acquiring a thumbnail corresponding to the second pixel value of the original picture and loading the thumbnail to an internal memory; the second pixel value is greater than the first pixel value;
replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in a screen visible area;
and if the number of the original pictures is not larger than the number of the display positions of the screen visual area, acquiring thumbnails of second pixel values of the original pictures, loading the thumbnails of the second pixel values to a memory, and displaying the thumbnails of the second pixel values in the screen visual area.
2. The method according to claim 1, wherein the obtaining and loading the thumbnail corresponding to the first pixel value of the original picture to the memory for the original picture not loaded with the thumbnail in the designated picture library comprises:
and acquiring a first page and a thumbnail of a first pixel value of the original picture within the specified page number after the first page, and loading the thumbnail to the memory.
3. The method of claim 2, further comprising:
when the sliding operation is received in the displayed thumbnail display page, the thumbnail of the first pixel value of the original picture is obtained and loaded to the memory aiming at the original picture which is not loaded in the appointed pages before and after the first page of the thumbnail displayed in the screen visible area.
4. The method of claim 1, wherein after said step of replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value for display in the viewable area of the screen, further comprising:
after the sliding operation is received in the displayed thumbnail display page, when the thumbnail of the second pixel value slides out of the visual area of the screen, the thumbnail of the second pixel value in the memory is deleted, and the corresponding thumbnail of the first pixel value is reloaded.
5. The method of claim 1, wherein after said step of replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value for display in the viewable area of the screen, further comprising:
and after the sliding operation is received in the displayed thumbnail display page, when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area, deleting the thumbnail of the second pixel value in the memory, and reloading the corresponding thumbnail of the first pixel value.
6. The method according to claim 4 or 5, further comprising, after the step of reloading the thumbnail of the respective first pixel value:
judging whether the distance between the position of the thumbnail of the first pixel value shifted out of the screen visual area and the screen visual area exceeds a specified distance threshold value or not;
and if so, deleting the thumbnail of the first pixel value from the memory.
7. The method according to claim 3, wherein after the step of obtaining, for the original picture that has not been loaded within the specified number of pages before and after the first page on which the thumbnail displayed in the screen visible area is located, the thumbnail of the first pixel value of the original picture and loading the thumbnail into the memory, the method further comprises:
and after the sliding operation is received in the displayed thumbnail display page, deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed page number.
8. The method according to claim 1, wherein before the step of, after receiving the trigger operation for loading the thumbnail of the specified picture library, for an original picture in which the thumbnail is not loaded in the specified picture library, acquiring the thumbnail corresponding to the first pixel value of the original picture and loading the thumbnail to the memory, the method further comprises:
after an original picture newly stored in the mobile terminal is scanned, a thumbnail of a first pixel value of the original picture is obtained and stored in an appointed cache folder.
9. The method according to claim 8, wherein the step of obtaining the thumbnail corresponding to the first pixel value of the original picture and loading the thumbnail into the memory for the original picture without loading the thumbnail in the designated picture library comprises:
and for the original picture without the thumbnail loaded in the specified picture library, reading the thumbnail corresponding to the first pixel value of the original picture from the specified cache folder and loading the thumbnail to a memory.
10. The method according to claim 1, wherein the step of obtaining a thumbnail corresponding to a second pixel value of an original picture corresponding to a thumbnail displaying a first pixel value in the screen visible area and loading the thumbnail into a memory comprises:
calling a drawable object interface function to obtain a drawable object of an original picture by taking the original picture as a source file;
calling a bitmap object interface function to extract a bitmap object from the drawable object;
and creating a thumbnail of a second pixel value by using the bitmap object and loading the thumbnail to a memory.
11. A picture display device, comprising:
the original picture quantity judging submodule is used for judging whether the quantity of the original pictures in the appointed picture library is greater than the quantity of the display positions of the screen visual area or not when the triggering operation of the thumbnail loading of the appointed picture library is received and the triggering operation of the thumbnail loading of the appointed picture library is the opening operation of a user on the thumbnail display page;
the first pixel value thumbnail loading sub-module is used for acquiring a thumbnail corresponding to a first pixel value of the original picture and loading the thumbnail to the memory aiming at the original picture which is not loaded with the thumbnail in the specified picture library if the number of the original pictures in the specified picture library is larger than the number of the display positions of the screen visual area;
the first pixel value thumbnail display module is used for displaying a thumbnail of a first pixel value which needs to be displayed in a screen visual area in the memory;
the second pixel value thumbnail loading module is used for acquiring a thumbnail of a second pixel value corresponding to an original picture corresponding to the thumbnail of the first pixel value displayed in the screen visible area and loading the thumbnail to the memory; the second pixel value is greater than the first pixel value;
the second pixel value thumbnail display module is used for replacing the thumbnail of the corresponding first pixel value with the thumbnail of the second pixel value to display in a visible area of a screen;
and the second pixel value thumbnail loading sub-module is used for acquiring and loading the thumbnails of the second pixel values of the original pictures into a memory and displaying the thumbnails of the second pixel values in the screen visual area if the number of the original pictures is not more than the number of the display positions of the screen visual area.
12. The apparatus of claim 11, wherein the first pixel value thumbnail loads a sub-module comprising:
and the first pixel value thumbnail loading unit is used for acquiring thumbnails of the first pixel values of the original pictures in the first page and the designated number of pages after the first page and loading the thumbnails to the memory.
13. The apparatus of claim 12, wherein the first pixel value thumbnail loads a sub-module comprising:
and the thumbnail loading sub-module of the first pixel value with the specified page number is used for acquiring the thumbnail of the first pixel value of the original picture and loading the thumbnail to the memory aiming at the original picture which is not loaded in the specified page number before and after the first page of the thumbnail displayed in the screen visible area when the displayed thumbnail display page receives the sliding operation.
14. The apparatus of claim 11, further comprising:
and the first deleting module is used for deleting the thumbnail of the second pixel value in the memory and reloading the corresponding thumbnail of the first pixel value when the thumbnail of the second pixel value slides out of the screen visible area after the sliding operation is received in the displayed thumbnail display page.
15. The apparatus of claim 11, further comprising:
and the second deleting module is used for deleting the thumbnail of the second pixel value in the memory and reloading the corresponding thumbnail of the first pixel value when the preset proportion part of the thumbnail of the second pixel value slides out of the screen visual area after the sliding operation is received in the displayed thumbnail display page.
16. The apparatus of claim 14 or 15, further comprising:
the moving-out distance judging module is used for judging whether the distance between the position of the thumbnail of the first pixel value of the moving-out screen visual area and the screen visual area exceeds a specified distance threshold value or not;
and the third deleting module is used for deleting the thumbnail of the first pixel value from the memory if the number of the thumbnail exceeds the number of the first pixel value.
17. The apparatus of claim 13, further comprising:
and the fourth deleting submodule is used for deleting the thumbnail of the first pixel value of the page with the distance from the page where the thumbnail with the second pixel value displayed in the visual area of the screen exceeds the appointed number of pages after the sliding operation is received in the displayed thumbnail display page.
18. The apparatus of claim 11, further comprising:
and the first pixel value thumbnail updating module is used for acquiring a thumbnail of a first pixel value of the original picture and storing the thumbnail into the designated cache folder after the original picture newly stored in the mobile terminal is scanned.
19. The apparatus of claim 18, wherein the first pixel value thumbnail loads a sub-module comprising:
and the first pixel value thumbnail updating and loading sub-module is used for reading the thumbnail of the first pixel value corresponding to the original picture from the specified cache folder and loading the thumbnail to the memory aiming at the original picture of which the thumbnail is not loaded in the specified picture library.
20. The apparatus of claim 11, wherein the second pixel value thumbnail loading module comprises:
the drawable object acquisition submodule is used for calling a drawable object interface function to take an original picture as a source file and acquiring a drawable object of the original picture;
the bitmap object extraction submodule is used for calling a bitmap object interface function to extract a bitmap object from the drawable object;
and the second pixel value thumbnail creating sub-module is used for creating a thumbnail of the second pixel value by using the bitmap object and loading the thumbnail to the memory.
21. A mobile terminal comprising a processor and a memory,
the memory is used for storing a program for executing the picture display method of any one of claims 1 to 10;
the processor is configured to execute programs stored in the memory.
CN201710013458.4A 2017-01-09 2017-01-09 Picture display method and device and mobile terminal Active CN106681667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710013458.4A CN106681667B (en) 2017-01-09 2017-01-09 Picture display method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710013458.4A CN106681667B (en) 2017-01-09 2017-01-09 Picture display method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN106681667A CN106681667A (en) 2017-05-17
CN106681667B true CN106681667B (en) 2020-07-17

Family

ID=58849306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710013458.4A Active CN106681667B (en) 2017-01-09 2017-01-09 Picture display method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN106681667B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710539B (en) * 2018-05-18 2021-03-16 珠海格力电器股份有限公司 Information processing method, terminal and readable storage medium
CN109976848A (en) * 2019-03-06 2019-07-05 腾讯科技(深圳)有限公司 A kind of image display method, device, equipment and storage medium
CN111722771B (en) * 2019-03-20 2022-06-07 富士胶片实业发展(上海)有限公司 Image association display method and device and computer readable medium
CN111444143B (en) * 2020-02-26 2024-02-23 车智互联(北京)科技有限公司 Picture display method and device in picture set and mobile terminal
CN111984361A (en) * 2020-09-27 2020-11-24 万兴科技(湖南)有限公司 File thumbnail display method and device, computer equipment and medium
CN114371798A (en) * 2020-10-23 2022-04-19 统信软件技术有限公司 Picture display method and computing device
CN112905277A (en) * 2021-01-25 2021-06-04 四川长虹电器股份有限公司 Intelligent display terminal large image loading method
CN114443995A (en) * 2022-01-28 2022-05-06 苏州浪潮智能科技有限公司 List data loading method and device, electronic equipment and storage medium
CN116107479B (en) * 2023-03-02 2024-02-13 优视科技有限公司 Picture display method, electronic device and computer storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004320247A (en) * 2003-04-14 2004-11-11 Fuji Photo Film Co Ltd Digital camera
JP2008099176A (en) * 2006-10-16 2008-04-24 Sony Corp Image recording and editing apparatus and image recording and editing method, and computer program
CN102253942A (en) * 2010-05-21 2011-11-23 腾讯数码(天津)有限公司 Image display method and equipment
CN103699673A (en) * 2013-12-30 2014-04-02 广州金山网络科技有限公司 Mobile terminal, picture processing method and picture processing device for mobile terminal
CN105100868A (en) * 2015-04-22 2015-11-25 深圳市美贝壳科技有限公司 Method and device for displaying picture and thumbnail lists
CN105096236A (en) * 2015-07-22 2015-11-25 北京锤子数码科技有限公司 Image thumbnail loading method and electronic device
CN105843569A (en) * 2016-02-19 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal image display method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004320247A (en) * 2003-04-14 2004-11-11 Fuji Photo Film Co Ltd Digital camera
JP2008099176A (en) * 2006-10-16 2008-04-24 Sony Corp Image recording and editing apparatus and image recording and editing method, and computer program
CN102253942A (en) * 2010-05-21 2011-11-23 腾讯数码(天津)有限公司 Image display method and equipment
CN103699673A (en) * 2013-12-30 2014-04-02 广州金山网络科技有限公司 Mobile terminal, picture processing method and picture processing device for mobile terminal
CN105100868A (en) * 2015-04-22 2015-11-25 深圳市美贝壳科技有限公司 Method and device for displaying picture and thumbnail lists
CN105096236A (en) * 2015-07-22 2015-11-25 北京锤子数码科技有限公司 Image thumbnail loading method and electronic device
CN105843569A (en) * 2016-02-19 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal image display method and system

Also Published As

Publication number Publication date
CN106681667A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
CN106681667B (en) Picture display method and device and mobile terminal
CN107995429B (en) Shooting method and mobile terminal
CN108495029B (en) Photographing method and mobile terminal
CN108205398B (en) Method and device for adapting webpage animation to screen
CN108769374B (en) Image management method and mobile terminal
EP4047549A1 (en) Method and device for image detection, and electronic device
US20210096739A1 (en) Method For Editing Text And Mobile Terminal
CN107193451B (en) Information display method and device, computer equipment and computer readable storage medium
CN108228902B (en) File display method and mobile terminal
US11290591B2 (en) Dialing method and mobile terminal
CN109413333B (en) Display control method and terminal
US20220351330A1 (en) Image cropping method and electronic device
CN111127595A (en) Image processing method and electronic device
CN108804628B (en) Picture display method and terminal
CN111596990A (en) Picture display method and device
CN110209324B (en) Display method and terminal equipment
CN110321449B (en) Picture display method and terminal
CN107632985B (en) Webpage preloading method and device
CN109739414B (en) Picture processing method, mobile terminal and computer readable storage medium
CN109542307B (en) Image processing method, device and computer readable storage medium
CN109040580B (en) Mobile terminal and photographing control method and device thereof
CN113900560A (en) Icon processing method, intelligent terminal and storage medium
CN110336917B (en) Picture display method and device, storage medium and terminal
CN110647506B (en) Picture deleting method and terminal equipment
CN110213437B (en) Editing method and mobile terminal

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
TA01 Transfer of patent application right

Effective date of registration: 20170803

Address after: 100102, 18 floor, building 2, Wangjing street, Beijing, Chaoyang District, 1801

Applicant after: BEIJING ANYUN SHIJI SCIENCE AND TECHNOLOGY CO., LTD.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: Beijing Qihu Technology Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant