CN107506119B - Picture display method, device, equipment and storage medium - Google Patents

Picture display method, device, equipment and storage medium Download PDF

Info

Publication number
CN107506119B
CN107506119B CN201710680507.XA CN201710680507A CN107506119B CN 107506119 B CN107506119 B CN 107506119B CN 201710680507 A CN201710680507 A CN 201710680507A CN 107506119 B CN107506119 B CN 107506119B
Authority
CN
China
Prior art keywords
picture
display size
actual display
size
calculating
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
CN201710680507.XA
Other languages
Chinese (zh)
Other versions
CN107506119A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710680507.XA priority Critical patent/CN107506119B/en
Publication of CN107506119A publication Critical patent/CN107506119A/en
Application granted granted Critical
Publication of CN107506119B publication Critical patent/CN107506119B/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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Abstract

The embodiment of the invention discloses a picture display method, a picture display device, picture display equipment and a storage medium, wherein the method comprises the following steps: analyzing an operation instruction of a user on the picture, and calculating the actual display size of the picture according to an analysis result; and judging whether the actual display size of the picture is larger than a preset threshold value, if not, decoding and displaying the picture according to the actual display size of the picture. The method saves the memory when the current page of pictures is displayed, and solves the problem of memory occupation when a large number of pictures are simultaneously displayed on a single page.

Description

Picture display method, device, equipment and storage medium
Technical Field
The present invention relates to display technologies, and in particular, to a method, an apparatus, a device, and a storage medium for displaying an image.
Background
When a picture needs to be displayed on a computer screen, the actual imaging effect of the picture during the picture display is determined by the pixels of the picture loaded in the memory, then the picture pixels are analyzed out and can be finally displayed on the screen, and each analyzed pixel occupies the memory. For very large pictures, such as high-resolution single-shot photos or microblog long pictures, a very large memory space is occupied during display.
Because the traditional picture viewing software views one picture at a time, the problem of crash caused by overlarge occupied memory does not exist. However, in typesetting software, the situation that a plurality of high-definition large images exist in a single typesetting page exists, and simultaneously, other software still needs to occupy memory during operation, so that a plurality of high-definition large images cannot be put down in the single typesetting page.
In the prior art, a displayed picture is usually loaded into a memory for display, and an undisplayed part is moved out of the memory, so that the problem that the memory is too large to be collapsed when the picture is distributed on different pages can only be solved.
Disclosure of Invention
Embodiments of the present invention provide a picture display method, an apparatus, a device, and a storage medium, which save memory when a current page picture is displayed, and solve a memory occupation problem when a single page has a large number of pictures displayed simultaneously.
In a first aspect, an embodiment of the present invention provides a picture display method, where the method includes:
analyzing an operation instruction of a user on the picture, and calculating the actual display size of the picture according to an analysis result;
and judging whether the actual display size of the picture is larger than a preset threshold value, if not, decoding and displaying the picture according to the actual display size of the picture.
In a second aspect, an embodiment of the present invention provides a picture display device, where the picture display device includes:
the instruction analysis module is used for analyzing an operation instruction of a user on the picture and calculating the actual display size of the picture according to an analysis result;
and the first display module is used for judging whether the actual display size of the picture is larger than a preset threshold value or not, and if not, decoding and displaying the picture according to the actual display size of the picture.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement a picture display method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a picture display method according to any one of the embodiments of the present invention.
In the embodiment of the invention, the operation instruction of the user on the picture is analyzed, the actual display size of the picture is calculated according to the analysis result, and when the actual display size of the picture is smaller than the preset threshold value, the picture is decoded and displayed according to the actual display size of the picture. The method saves the memory when the current page of pictures is displayed, and solves the problem of memory occupation when a large number of pictures are simultaneously displayed on a single page.
Drawings
FIG. 1 is a flowchart illustrating a method for displaying pictures according to a first embodiment of the present invention;
FIG. 2a is a flowchart of a method for displaying pictures according to a second embodiment of the present invention;
FIG. 2b is a schematic diagram of a timeline showing a variation in picture display size according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a picture display device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a picture display method according to an embodiment of the present invention, where the present embodiment is applicable to a situation where a single page has multiple pictures to be displayed, and the method can be executed by a picture display apparatus according to an embodiment of the present invention, and the apparatus can be implemented in a software and/or hardware manner. Referring to fig. 1, the method may specifically include the following steps:
and S110, analyzing the operation instruction of the user on the picture, and calculating the actual display size of the picture according to the analysis result.
Specifically, a picture is displayed on a computer screen, and the actual imaging effect of the picture when the picture is displayed is determined by the pixels of the picture loaded in the memory. Optionally, the formats of the pictures include uncompressed formats such as bmp, compressed formats such as jpg or png, and extremely compressed formats such as WebP or TPG, and in the existing picture display scheme, picture pixels to be displayed are completely analyzed to occupy a memory when finally displayed on a screen.
Optionally, in the typesetting software, the operation instruction of the user on the picture includes zooming the picture and rotating the picture. And analyzing the operation instruction of the user on the picture, and calculating the actual display size of the picture according to the analysis result. Taking the example of a user scaling a picture, the display size of the picture is calculated from a scaling component, which includes two values, a horizontal direction and a vertical direction. In one specific example, the process of calculating the actual display size of the picture is performed in four steps:
the method comprises the following steps of firstly, calculating a transformation matrix of picture elements in an application program, optionally, the transformation matrix comprises superposition of element changes of each layer of an interface, calculating the transformation matrix by using an interface frame method system. Illustratively, the scaling component calculated in this step may be a scaling component of the picture itself, for example, scaling from 100% to 70%. It should be noted that, when the picture is not scaled and rotated, the value of the first scaling component is 100%, i.e. 1.
Second, computing the transformation matrix outside the application, typically setting the operating system DPI (Dots Per Inch) can cause the DPI scaling component to be included in the transformation matrix, where the DPI setting can be understood as the resolution setting, and the object for which is the actual display element, not the display. A second scaling component is calculated from the transformation matrix. For example, for some existing higher-configured displays, the second zoom component may be 2.0, and for some lower-configured displays, the second zoom component is 1.0, and the specific value of the second zoom component is related to the specific configuration of the display and is not limited herein.
And thirdly, multiplying the first scaling component and the second scaling component to obtain a comprehensive scaling component.
And fourthly, acquiring the internal size of the picture, and multiplying the internal size by the comprehensive scaling component to obtain the actual display size.
And S120, judging whether the actual display size of the picture is larger than a preset threshold value, and if not, executing S130.
Specifically, the actual display size of the picture is compared with a preset threshold. Optionally, the preset threshold may be 0.5 times of the original image size. In a specific example, if the picture source is a screenshot, the display size and the original size, which are usually calculated, are not much different, and are more than 0.5 times of the original size, that is, more than the preset threshold. If the source of the picture is a photo, the photo can be shot by a single lens reflex or shot by a mobile phone, and the display size obtained through calculation is very large, and the display size is usually below 0.5 times of the original image, namely smaller than a preset threshold value.
Optionally, the original image size generally refers to a pixel resolution of an original image, and when the original image size of the image is compared with a preset threshold, the size larger than 0.5 times of the original image size may be larger than 0.5 times of the width of the original image size by the width of the actual display size, or larger than 0.5 times of the height of the original image size by the height of the actual display size; less than 0.5 times the original size may be such that the width of the actual display size is no greater than 0.5 times the width of the original size and the height of the actual display size is no greater than 0.5 times the height of the original size.
And S130, decoding and displaying the picture according to the actual display size of the picture.
Specifically, when the actual display size of the picture is smaller than a preset threshold, the picture is decoded and displayed according to the actual display size of the picture. In a specific example, when the picture is a photo, a small picture can be used without being too sharp, and the display size of the small picture is smaller than a preset threshold value, so that the small picture is decoded and displayed according to the actual display size of the photo.
Optionally, if the actual display size of the picture is larger than a preset threshold, the picture is displayed according to the original size of the picture.
And when the actual display size of the picture is larger than a preset threshold value, decoding and displaying according to the original picture size of the picture. In a specific example, when the picture is a screenshot, the picture needs to be displayed sharper, and the display size of the picture is larger than a preset threshold, so that the picture is decoded and displayed according to the original size of the screenshot.
For example, when the display size is not equal to the original size, the interface frame may be zoomed by using a method of zooming the picture, which may consider the alignment of pixels on the screen, and the sharpness of the display may be high, which may trade off the detail of the picture for the clear display effect.
For example, when a picture with a smaller size is generated first, since the generation effect of the image cannot be dynamically determined according to the alignment condition of pixels on the screen due to the generation in advance, only a general image scaling interpolation algorithm can be adopted, the effect of rendering the original image is closest to the effect of rendering the original image by using a nearest neighbor node algorithm, and the loss of details is less but the blurring is likely to be blurry by using a linear interpolation algorithm. In practical applications, the selection of the algorithm may be made in accordance with specific circumstances.
In the embodiment of the invention, the actual display size of the picture is calculated according to the analysis result by analyzing the operation instruction of the user on the picture; and when the actual display size of the picture is smaller than the preset threshold value, decoding and displaying the picture according to the actual display size of the picture. The method saves the memory when the current page of pictures is displayed, and solves the problem of memory occupation when a large number of pictures are simultaneously displayed on a single page.
On the basis of the above technical solution, before analyzing the operation instruction of the user on the picture and calculating the actual display size of the picture according to the analysis result, the method further includes: when detecting that the picture is inserted into the current page and/or the user switches the current page, confirming whether the picture needs to be displayed on the current page; and if so, acquiring an operation instruction of the user on the picture corresponding to the operation.
Optionally, before analyzing an operation instruction of the user on the picture and calculating the actual display size of the picture according to the analysis result, it is first determined whether the picture needs to be displayed on the current page. Under a normal condition, when the operation that the picture is inserted into the current page and/or the current page is switched by a user is detected, whether the picture needs to be displayed on the current page is confirmed, and if the picture needs to be displayed on the current page, an operation instruction of the user on the picture corresponding to the operation is acquired.
In a specific example, the number of pictures inserted into the current page may be changed from none to few or from few to many, that is, a new picture to be displayed is added to the software from none to few, and the software may be typesetting software, such as word software. The specific application scenario may be that the user inserts at least one picture in the current page, or that the user deletes one picture in the current page and clicks the undo operation. The operation of switching the current page by the user can be specifically in typesetting software, the operation of switching the page by the user can be specifically in an application scene, and one or more of a plurality of non-current pages can be selected to be displayed to become the current page; changing one or more of the current pages to a non-current page causes the pictures inside the page to switch to a displayed or non-displayed state. And detecting whether the picture needs to be displayed on the current page, if so, acquiring an operation instruction of the user for the picture corresponding to the operation, namely, whether the operation instruction and the operation of the user for the picture are that the picture is inserted into the current page or the current page is switched by the user is corresponding. A condition for acquiring an operation instruction of a user on a picture is provided.
Example two
Fig. 2a is a flowchart of a picture display method according to a second embodiment of the present invention, where "analyzing an operation instruction of a user on a picture, and determining an actual display size of the picture according to an analysis result" is optimized in this embodiment based on the above embodiment. Referring to fig. 2a, the method may specifically include the steps of:
and S210, analyzing the operation instruction of the user on the picture.
And S220, monitoring whether the display size of the picture changes or not according to the analysis result, if so, executing S230, and otherwise, executing S240.
Optionally, there is a monitoring queue, the pictures in the monitoring queue are monitored, the pictures not in the monitoring queue are not monitored, and the monitoring queue is updated in real time. In this queue, all picture elements are shared, and the function of a picture element is to display a picture, and the picture elements correspond to pictures one to one. The monitoring queue comprises all picture elements being monitored, and the updating mode of the monitoring queue is as follows: and when the picture is detected to be not on the current page, removing the picture element from the monitoring queue so as to update the monitoring queue. It should be noted that when it is detected that monitoring is not required again before switching to the current page next time, the picture is also removed from the monitoring queue.
And if the monitoring time is up, all picture elements are taken out from the monitoring queue. If the fetched picture element is already the original image, it is moved out of the monitoring queue. For each remaining picture element, the current actual display size and the actual display size during the last monitoring are calculated, and the two sizes are monitored to be different, that is, the display size of the monitored picture is changed.
And S230, taking the changed picture display size as the actual display size of the picture.
If the display size of the picture is detected to be changed, the picture is marked, after a period of time, whether the display size of other pictures is changed or not is judged, if yes, the picture is continuously waited, otherwise, the picture is displayed after the period of time is ended, and the changed picture size is used as the actual display size of the picture. Alternatively, the time period may take 100 ms.
In a specific example, if a picture occupies a part of the memory, the picture is ready to be rendered again, the old picture memory is destroyed, and the new picture memory is used.
And S240, directly taking the display size of the picture as the actual display size of the picture.
Specifically, if the display size of the picture is not changed, the display size of the picture is directly used as the actual display size of the picture. In a specific example, the display size of the picture is not changed, and may also be a case of displaying the picture for the first time, and since the picture is not generated before the picture is displayed for the first time and occupies the memory, or the memory occupied by the generated picture is destroyed, the display size of the picture is directly used as the actual display size of the picture.
And S250, judging whether the actual display size of the picture is larger than a preset threshold value, and if not, executing S260.
And S260, decoding and displaying the picture according to the actual display size of the picture.
In the embodiment of the invention, the operation instruction of the user on the picture is analyzed, whether the display size of the picture is changed or not is monitored according to the analysis result, if yes, the changed display size of the picture is taken as the actual display size of the picture, and if not, the display size of the picture is directly taken as the actual display size of the picture. The actual display size of the picture is determined according to the operation instruction of the picture.
Optionally, the monitoring whether the display size of the picture changes includes: refreshing the display size of the picture at fixed time intervals within a preset time period; and monitoring whether the display size of the picture is changed within the preset time period.
Optionally, the monitoring operation is performed by a monitoring module, and if the monitoring module is turned on, the cycle monitoring is started and the monitoring is performed again at regular intervals. The time interval is chosen to be 100ms taking into account the balance between user perception and computer performance. Optionally, when the user wants to zoom the picture at any time, the picture can be clearly displayed, but this way consumes more computer resources, and if the perception of the user is within an acceptable range by refreshing the picture within 200ms, the preset time period is 200 ms. Considering that a certain time (about 100ms) is required for waiting for re-rendering the display picture and reproducing the rendered display picture, the monitoring time interval is 100 ms.
In a specific example, fig. 2b shows a time axis of picture display size variation. Referring to fig. 2b, assuming that the zooming action is performed once every 35ms, it should be noted that the action interval is related to the habit of the user performing the zooming action, but the difference is not large in general, and the 35ms is taken as an example for description here. In a preset time period of 200ms, the time for executing the zooming action for the first time is set to be 0ms, then the times for sequentially executing the zooming action are 35ms, 70ms, 105ms and 140ms, and 100ms and 200ms are monitoring points. And at 100ms, when the picture display size is monitored to be changed, timing is performed for 100ms again, and when the picture display size is not changed any more, timing time is up to 200 ms. And when the timing time is up, refreshing the picture, namely judging whether the display size of the picture is changed. The specific application scenario may be that, in the process of zooming a picture from 100% to 60%, the zooming operation is not completed at one time, but occurs at different times, and it cannot be monitored at every moment whether the display size of the picture changes, and it is necessary to refresh the display size of the picture when the size of the picture does not change any more.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an image display device according to a third embodiment of the present invention, which is suitable for implementing an image display method according to the third embodiment of the present invention. As shown in fig. 3, the apparatus may specifically include:
the instruction analysis module 310 is configured to analyze an operation instruction of the user on the picture, and calculate an actual display size of the picture according to an analysis result;
the first display module 320 is configured to determine whether an actual display size of the picture is greater than a preset threshold, and if not, decode and display the picture according to the actual display size of the picture.
Further, the apparatus further comprises:
and the second display module is used for decoding and displaying the picture according to the original size of the picture if the actual display size of the picture is larger than a preset threshold value.
Further, the apparatus further comprises:
the instruction acquisition module is used for confirming whether the picture needs to be displayed on the current page when detecting that the picture is inserted into the current page and/or the user switches the operation of the current page before analyzing the operation instruction of the user on the picture and calculating the actual display size of the picture according to the analysis result; and if so, acquiring an operation instruction of the user on the picture corresponding to the operation.
Further, the instruction parsing module 310 includes:
the analysis submodule is used for analyzing an operation instruction of a user on the picture;
the size monitoring submodule is used for monitoring whether the display size of the picture is changed or not according to the analysis result, and if the display size of the picture is changed, the changed display size of the picture is used as the actual display size of the picture; otherwise, directly taking the display size of the picture as the actual display size of the picture.
Further, the size monitoring submodule is specifically configured to:
refreshing the display size of the picture at fixed time intervals within a preset time period;
and monitoring whether the display size of the picture is changed within the preset time period.
The picture display device provided by the embodiment of the invention can execute the picture display method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a picture display method provided by an embodiment of the present invention:
that is, the processing unit implements, when executing the program: analyzing an operation instruction of a user on the picture, and calculating the actual display size of the picture according to an analysis result; and judging whether the actual display size of the picture is larger than a preset threshold value, if not, decoding and displaying the picture according to the actual display size of the picture.
EXAMPLE five
Fifth, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the image display method provided in all the embodiments of the present invention:
that is, the program when executed by the processor implements: analyzing an operation instruction of a user on the picture, and calculating the actual display size of the picture according to an analysis result; and judging whether the actual display size of the picture is larger than a preset threshold value, if not, decoding and displaying the picture according to the actual display size of the picture.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. The picture display method is applied to the situation that a plurality of pictures exist in a single page and need to be displayed, and comprises the following steps:
analyzing the reduction instruction of the user to the picture, and calculating the actual display size of the picture according to the analysis result;
judging whether the actual display size of the picture is larger than a preset threshold value or not;
when the picture is a photo, if the actual display size of the picture is smaller than or equal to a preset threshold value, decoding and displaying the picture according to the actual display size of the picture;
when the picture is the screenshot, if the actual display size of the picture is larger than a preset threshold, decoding and displaying the picture according to the original size of the picture;
wherein, the calculating the actual display size of the picture comprises:
calculating a transformation matrix of picture elements in the application program, and calculating a first scaling component through the transformation matrix;
calculating a transformation matrix outside the application program, and calculating a second scaling component through the transformation matrix;
multiplying the first scaling component and the second scaling component to obtain a comprehensive scaling component;
and acquiring the internal size of the picture, and multiplying the internal size by the comprehensive scaling component to obtain the actual display size of the picture.
2. The method according to claim 1, before parsing the instruction of reducing the picture by the user and calculating the actual display size of the picture according to the parsing result, further comprising:
when detecting that the picture is inserted into the current page and/or the user switches the current page, confirming whether the picture needs to be displayed on the current page;
and if so, acquiring a zoom-out instruction of the user corresponding to the operation on the picture.
3. The method of claim 1, wherein the parsing the user's instruction to reduce the picture and the determining the actual display size of the picture according to the parsing result comprises:
analyzing a reduction instruction of a user to the picture;
monitoring whether the display size of the picture is changed or not according to the analysis result, and if so, taking the changed display size of the picture as the actual display size of the picture;
otherwise, directly taking the display size of the picture as the actual display size of the picture.
4. The method of claim 3, wherein monitoring whether the display size of the picture changes comprises:
refreshing the display size of the picture at fixed time intervals within a preset time period;
and monitoring whether the display size of the picture is changed within the preset time period.
5. The picture display device is applied to the situation that a plurality of pictures exist in a single page and need to be displayed, and comprises the following components:
the instruction analysis module is used for analyzing the reduction instruction of the user to the picture and calculating the actual display size of the picture according to the analysis result;
the first display module is used for judging whether the actual display size of the picture is larger than a preset threshold value or not, and when the picture is a photo, if the actual display size of the picture is smaller than or equal to the preset threshold value, decoding and displaying the picture according to the actual display size of the picture;
the first display module is further used for decoding and displaying the picture according to the original size of the picture if the actual display size of the picture is larger than a preset threshold when the picture is the screenshot;
wherein, the calculating the actual display size of the picture comprises:
calculating a transformation matrix of picture elements in the application program, and calculating a first scaling component through the transformation matrix;
calculating a transformation matrix outside the application program, and calculating a second scaling component through the transformation matrix;
multiplying the first scaling component and the second scaling component to obtain a comprehensive scaling component;
and acquiring the internal size of the picture, and multiplying the internal size by the comprehensive scaling component to obtain the actual display size of the picture.
6. The apparatus of claim 5, further comprising:
the instruction acquisition module is used for confirming whether the picture needs to be displayed on the current page when detecting the operation that the picture is inserted into the current page and/or the user switches the current page before analyzing a reduction instruction of the picture by the user and calculating the actual display size of the picture according to an analysis result; and if so, acquiring a zoom-out instruction of the user corresponding to the operation on the picture.
7. The apparatus of claim 5, wherein the instruction parsing module comprises:
the analysis submodule is used for analyzing the reduction instruction of the user to the picture;
the size monitoring submodule is used for monitoring whether the display size of the picture is changed or not according to the analysis result, and if the display size of the picture is changed, the changed display size of the picture is used as the actual display size of the picture; otherwise, directly taking the display size of the picture as the actual display size of the picture.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-4 when executing the program.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201710680507.XA 2017-08-10 2017-08-10 Picture display method, device, equipment and storage medium Active CN107506119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710680507.XA CN107506119B (en) 2017-08-10 2017-08-10 Picture display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710680507.XA CN107506119B (en) 2017-08-10 2017-08-10 Picture display method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107506119A CN107506119A (en) 2017-12-22
CN107506119B true CN107506119B (en) 2020-11-03

Family

ID=60690644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710680507.XA Active CN107506119B (en) 2017-08-10 2017-08-10 Picture display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107506119B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414308B (en) * 2020-03-26 2023-08-22 抖音视界有限公司 Application package processing method and application running method and device
CN112700507A (en) * 2020-12-28 2021-04-23 统信软件技术有限公司 Picture display method, computing device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005167657A (en) * 2003-12-03 2005-06-23 Seiko Epson Corp Image processor and image processing method
CN103197882A (en) * 2013-02-22 2013-07-10 北京小米科技有限责任公司 Image display method and mobile terminal
CN104850660A (en) * 2015-06-04 2015-08-19 广东欧珀移动通信有限公司 Picture displaying method, picture displaying device and mobile terminal
CN105957011B (en) * 2016-05-25 2019-05-21 北京小米移动软件有限公司 Image processing method and device

Also Published As

Publication number Publication date
CN107506119A (en) 2017-12-22

Similar Documents

Publication Publication Date Title
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
EP4002281A1 (en) Layer composition method and apparatus, electronic device, and storage medium
US9001274B2 (en) Image processing method
US10032257B2 (en) Super resolution processing method, device, and program for single interaction multiple data-type super parallel computation processing device, and storage medium
CN105389159A (en) Picture rendering method, device and mobile terminal
KR20200011000A (en) Device and method for augmented reality preview and positional tracking
CN111476852A (en) Reader refresh method, computing device, and computer storage medium
CN107506119B (en) Picture display method, device, equipment and storage medium
CN112509146A (en) Image processing method, image processing device, electronic equipment and storage medium
US20160093079A1 (en) Enhanced document readability on devices
CN115209145A (en) Video compression method, system, device and readable storage medium
JPWO2011077550A1 (en) Screen relay device
CN112565890B (en) Video clipping method and device, storage medium and electronic equipment
CN109218799B (en) Method, storage medium, device and system for quickly switching high-definition images of android television
CN108024116B (en) Data caching method and device
CN112000908A (en) Picture loading method, device and system, electronic equipment and readable storage medium
CN111477183A (en) Reader refresh method, computing device, and computer storage medium
CN113362235A (en) Image defogging method and device
CN109859328B (en) Scene switching method, device, equipment and medium
CN101996390B (en) Image copying method and device
TWI586144B (en) Multiple stream processing for video analytics and encoding
CN105427235A (en) Image browsing method and system
CN111083552A (en) Thumbnail generation method, device, equipment and medium
CN109429067B (en) Dynamic picture compression method and device, computer equipment and storage medium
CN111522609A (en) Page display method and device

Legal Events

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