CN109144370B - Screen capturing method, device, terminal and computer readable medium - Google Patents

Screen capturing method, device, terminal and computer readable medium Download PDF

Info

Publication number
CN109144370B
CN109144370B CN201811165565.XA CN201811165565A CN109144370B CN 109144370 B CN109144370 B CN 109144370B CN 201811165565 A CN201811165565 A CN 201811165565A CN 109144370 B CN109144370 B CN 109144370B
Authority
CN
China
Prior art keywords
screen
coordinate
screen capture
area
terminal
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
CN201811165565.XA
Other languages
Chinese (zh)
Other versions
CN109144370A (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.)
Zhuhai Seal Interest Technology Co Ltd
Original Assignee
Zhuhai Baoqu 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 Zhuhai Baoqu Technology Co Ltd filed Critical Zhuhai Baoqu Technology Co Ltd
Priority to CN201811165565.XA priority Critical patent/CN109144370B/en
Publication of CN109144370A publication Critical patent/CN109144370A/en
Application granted granted Critical
Publication of CN109144370B publication Critical patent/CN109144370B/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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a screen capture method, a screen capture device, a terminal and a computer readable medium, wherein the method comprises the following steps: receiving a screen capture request input by a user aiming at a terminal display interface; responding to a screen capture request, and capturing the content of a first screen capture area in the terminal display interface according to the screen capture parameters to obtain a first screen capture picture; and the screen capture parameters are determined according to the size of the terminal display screen. Through the method and the device, the universality is good, the method and the device can be suitable for terminals of different models and display screen sizes, and black edges or transparent edges can be avoided from appearing in the screen capturing picture.

Description

Screen capturing method, device, terminal and computer readable medium
Technical Field
The invention relates to the technical field of computers, in particular to a screen capturing method, a screen capturing device, a screen capturing terminal and a computer readable medium.
Background
Along with the rapid development of the intelligent terminal, the functions of the intelligent terminal are more and more. Almost all intelligent terminals have a screen capture function. At present, most intelligent terminal equipment adopts a physical combination key as a screen capture key, and when the physical combination key is simultaneously in a pressed state, the intelligent terminal captures the content displayed on the current display screen.
In the prior art, the models of the intelligent terminals are numerous, the sizes of the display screens are different, for example, the size of the display screen of the intelligent terminal 1 is 4.7 inches, the size of the display screen of the intelligent terminal 2 is 5.3 inches, and the like, when the content displayed on the display screen of the terminal is intercepted, a corresponding screenshot application program (that is, the model of one intelligent terminal corresponds to one screenshot application program) needs to be developed according to the model of the intelligent terminal, for example, the intelligent terminal 1 adopts the screenshot application program 1 to intercept the screen, because the size of the display screen of the intelligent terminal 1 is different from the size of the display screen of the intelligent terminal 2, when the intelligent terminal 2 adopts the screenshot application program 1 to intercept the screen, an abnormal display state appears in the screenshot picture obtained by the screenshot operation easily. Thus, it can be seen that the above screen capture method is not universal.
Disclosure of Invention
The embodiment of the invention provides a screen capturing method, a screen capturing device, a terminal and a computer readable medium.
In a first aspect, an embodiment of the present invention provides a screen capture method, where the method includes:
receiving a screen capture request input by a user aiming at a terminal display interface;
responding to the screen capture request, and capturing the content of a first screen capture area in the terminal display interface according to the screen capture parameters to obtain a first screen capture picture; and the screen capture parameters are determined according to the size of the terminal display screen.
According to the embodiment of the invention, the method has good universality, can be suitable for terminals with different models and display screen sizes, and can avoid black edges or transparent edges in screen capturing pictures.
Optionally, before the responding to the screen capture request and capturing the content of the first screen capture area in the terminal display interface according to the screen capture parameter to obtain the first screen capture picture, the method further includes:
calculating according to the first screen capture area, the offset value P and the offset direction to obtain a second screen capture area; wherein, P is a positive integer greater than 0;
the screen capturing the content of the first screen capturing area in the terminal display interface according to the screen capturing parameters to obtain a first screen capturing picture, and the screen capturing method comprises the following steps:
and capturing the content of the second screen capturing area in the terminal display interface to obtain the first screen capturing picture.
By implementing the embodiment of the invention, the terminal can calculate to obtain the second screen capture area according to the first screen capture area, the offset parameter P and the offset direction, and then screen capture is carried out on the content of the second screen capture area in the terminal display interface, so that the problem that screen capture pictures obtained by executing screen capture operation are inconsistent when the terminal is in a left horizontal screen state or a right horizontal screen state in the prior art can be solved.
Optionally, the method further includes:
acquiring the size of the terminal display screen, and setting the screen capture parameters according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in the display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen.
Optionally, the first screen-cut region is located in a display region of the terminal display screen, and includes:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate is less than a preset length, the distance between the second coordinate and the sixth coordinate is less than the preset length, the distance between the third coordinate and the seventh coordinate is smaller than the preset length, and the distance between the fourth coordinate and the eighth coordinate is smaller than the preset length.
Optionally, after receiving a screen capture request input by a user for a terminal display interface, the responding to the screen capture request, and performing screen capture on content in the terminal display interface according to a first screen capture area corresponding to a screen capture parameter before obtaining a first screen capture picture, further includes:
if the fact that the terminal display interface comprises the floating window is detected, acquiring an operation gesture of a user for the floating window;
and if the operation gesture is matched with a preset operation gesture, removing and displaying the floating window.
In a second aspect, an embodiment of the present invention provides a screen capture apparatus, which includes means for performing the method of the first aspect. Specifically, the screen capture device includes:
the receiving unit is used for receiving a screen capture request input by a user aiming at a terminal display interface;
the screen capture unit is used for responding to the screen capture request and capturing the screen of the content of a first screen capture area in the terminal display interface according to the screen capture parameters to obtain a first screen capture picture; and the screen capture parameters are determined according to the size of the terminal display screen.
Optionally, the screen capture device further includes: a calculation unit;
the calculation unit is used for calculating to obtain a second screen capture area according to the first screen capture area, the offset value P and the offset direction; wherein, P is a positive integer greater than 0;
the screen capture unit is specifically configured to:
and capturing the content of the second screen capturing area in the terminal display interface to obtain the first screen capturing picture.
Optionally, the screen capture device further includes: a setting unit;
the setting unit is used for acquiring the size of the terminal display screen and setting the screen capture parameters according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in the display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen.
Optionally, the first screen-cut region is located in a display region of the terminal display screen, and includes:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate is less than a preset length, the distance between the second coordinate and the sixth coordinate is less than the preset length, the distance between the third coordinate and the seventh coordinate is smaller than the preset length, and the distance between the fourth coordinate and the eighth coordinate is smaller than the preset length.
Optionally, the screen capture device further includes: an acquisition unit and a removal unit;
the acquiring unit is used for acquiring an operation gesture of a user for the floating window when the floating window is detected to be included in the terminal display interface;
the removing unit is used for removing and displaying the floating window when the operation gesture is matched with a preset operation gesture.
In a third aspect, an embodiment of the present invention provides another terminal, which includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program that supports the terminal to execute the foregoing method, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the foregoing method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program comprising program instructions, which, when executed by a processor, cause the processor to perform the method of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program, which includes program instructions, which, when executed by a processor, cause the processor to perform the method of the first aspect.
By implementing the embodiment of the invention, the method has good universality, can be suitable for terminals with different models and different display screen sizes, and can avoid the occurrence of black edges and/or transparent edges in the screen capturing pictures obtained by terminal screen capturing. In addition, the terminal can calculate to obtain a second screen capture area according to the offset value, the offset direction and the first screen capture area determined by the screen capture parameter, and then screen capture is performed on the content of the second screen capture area in the display interface of the terminal, so that the screen capture pictures obtained when the terminal is in the left landscape screen state and the right landscape screen state are consistent, and the problem that in the prior art, the screen capture pictures obtained after screen capture operation is performed when the terminal is in the left landscape screen state and the right landscape screen state are inconsistent can be solved.
Drawings
In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings used in the description of the embodiment will be briefly introduced below.
FIG. 1A is a schematic flow chart of a screen capture method provided by an embodiment of the invention;
fig. 1B is an operation diagram of a user touching a screen capture function button according to an embodiment of the present invention;
fig. 1C is a schematic diagram of a first screen cut-off region and a display region of a display screen of a terminal according to an embodiment of the present invention;
FIG. 2A is a schematic flow chart diagram of a screen capture method according to another embodiment of the present invention;
fig. 2B is a schematic position diagram of the terminal in the left landscape state according to the embodiment of the present invention;
fig. 2C is a schematic position diagram of the terminal in a right landscape state according to the embodiment of the present invention;
fig. 2D is a schematic diagram of a screenshot picture obtained by a screenshot operation when the terminal is in a left landscape state according to the embodiment of the present invention;
fig. 2E is a schematic diagram of a screenshot picture obtained by a screenshot operation when the terminal is in a right landscape state according to the embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram of a screen capture method according to another embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram of a screen capture method according to another embodiment of the present invention;
fig. 5A is a schematic structural diagram of a screen capture device according to an embodiment of the present invention;
FIG. 5B is a schematic structural diagram of another screen capture device provided in the embodiment of the present invention;
FIG. 5C is a schematic structural diagram of another screen capture device provided in the embodiment of the present invention;
FIG. 5D is a schematic structural diagram of another screen capture device provided in the embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In particular implementations, the terminals described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
Referring to the flowchart of fig. 1A of the screen capturing method provided in the embodiment of the present invention, how to capture a screen of content in a terminal display interface in the embodiment of the present invention is specifically described below, as shown in fig. 1A, the method may include the following steps S101 to S102:
and step S101, receiving a screen capture request input by a user aiming at a terminal display interface.
The display screen of the terminal in the embodiment of the present invention may include, but is not limited to: full screen, bang screen, etc.
In a possible implementation manner, the terminal may adopt a physical combination key as a screen capture key, and when a user presses all the physical combination keys, a screen capture request input by the user for a terminal display interface is triggered. For example, the display interface of the terminal displays the text or the picture that the user 1 is interested in, and the user 1 presses the physical combination key at the same time. In this case, when the terminal acquires that the physical combination keys are all in the pressed state, that is, the terminal receives a screen capture request input by a user for a terminal display interface.
In another possible implementation manner, the terminal may use a preset screen capture function button as a screen capture key, and when a user performs a touch operation on the screen capture function button, the screen capture request input by the user for the terminal display interface is triggered. In particular applications, the touch operation includes, but is not limited to, a click, a press, a slide operation, and the like. For example, as shown in fig. 1B, characters or pictures (e.g., pandas) interesting to the user 1 are displayed on the display interface of the terminal, and the user 1 performs one-click operation on the screen capture function button 101. In this case, the terminal receives a click operation of the user on the screen capture function button 101, that is, the terminal receives a screen capture request input by the user on the terminal display interface.
Step S102, responding to the screen capturing request, and capturing the content of a first screen capturing area in the terminal display interface according to the screen capturing parameters to obtain a first screen capturing picture; and the screen capture parameters are determined according to the size of the terminal display screen.
In specific implementation, the size of the terminal display screen is obtained, and the screen capture parameters are set according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in the display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen.
Taking a quadrangle with regular display interfaces of a first screen capture area and a terminal display screen as an example, the first screen capture area is located in the display area of the terminal display screen, and the method comprises the following steps:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate is less than a preset length, the distance between the second coordinate and the sixth coordinate is less than the preset length, the distance between the third coordinate and the seventh coordinate is smaller than the preset length, and the distance between the fourth coordinate and the eighth coordinate is smaller than the preset length.
For example, the size of the terminal display screen is 1080 × 2280, the screen capture parameter set by the terminal according to the size of the terminal display screen is 1060 × 2280, as shown in fig. 1C, 10 represents a display area corresponding to the size of the terminal display screen, 20 represents a first screen capture area determined by the screen capture parameter, the display area corresponding to the size of the terminal display screen is a regular closed area surrounded by vertices of a point a, a point B, a point C, and a point D, and the first screen capture area corresponding to the screen capture parameter is a regular closed area surrounded by vertices of a point a ', a point B', a point C ', and a point D'.
Then, after the terminal receives a screen capture request input by the user for the terminal display interface, the terminal captures the content of the first screen capture region in the terminal display interface according to the screen capture parameter 1060 × 2280, so that the first screen capture picture can be obtained.
In a specific implementation, the first screenshot picture does not include a black edge and/or a transparent edge.
For example, the terminal captures a game video played by the terminal, and the first screenshot picture obtained by the method is the game video picture, specifically, the first screenshot picture does not include a black edge and/or a transparent edge, in this case, when the terminal needs to identify a character in the game video picture, the black edge and/or the transparent edge in the picture do not need to be processed, and adverse effects on the terminal identification process caused by the black edge and/or the transparent edge in the picture can also be avoided.
According to the embodiment of the invention, the method has good universality, can be suitable for terminals with different models and display screen sizes, and can avoid black edges and/or transparent edges in the screen shot pictures obtained by terminal screen shooting.
Optionally, after the terminal executes the step S101 and before the step S102, the terminal may further execute the step S103. Specifically, referring to fig. 2A, it is a schematic flow chart of a screen capturing method according to another embodiment of the present invention, and step S103 is described in detail below.
Step S103, calculating according to the first screen capture area, the offset value P and the offset direction to obtain a second screen capture area; wherein, P is a positive integer greater than 0.
In a specific implementation, the capturing the content of the first screenshot area in the terminal display interface according to the screenshot parameter to obtain a first screenshot picture includes:
and capturing the content of the second screen capturing area in the terminal display interface to obtain the first screen capturing picture.
For example, the offset value P may be 1, 2, 3, and the like, and the embodiment of the present invention is not limited in particular.
Illustratively, the offset direction may include an upward movement, a downward movement, a leftward movement, a rightward movement, and the like.
For example, the first screenshot area is a regular closed area surrounded by a point a, a point B, a point C and a point D as vertices, and a coordinate system is established with the point a as an origin, the AB as a horizontal axis, and the AD as a vertical axis, where the coordinates of the point a are (0,0), the coordinates of the point B are (2260,0), the coordinates of the point C are (2260,1075), and the coordinates of the point D are (0,1075). And the terminal captures the contents of the second screenshot area in the terminal display interface to obtain a first screenshot picture, wherein the coordinates of the point A 'are (5,0), the coordinates of the point B' are (2265,0), the coordinates of the point C 'are (2265,1075), and the coordinates of the point D' are (5,1075) in the second screenshot area obtained by calculation according to the first screenshot area, the offset value P is 5 and the offset direction (horizontal right).
To facilitate description of how to move the first screenshot area according to the offset value P and the offset direction to obtain the second screenshot area in the embodiment of the present invention, a specific case that the terminal is in the left landscape state and the terminal is in the right landscape state in the embodiment of the present invention will be described next. As shown in fig. 2B, assuming that the current terminal is in the left landscape state, when the terminal in the left landscape state is rotated by 180 °, in this case, the terminal is in the right landscape state, and in particular, see fig. 2C.
For example, when the terminal does not move the first screen cut region, the first screen cut picture obtained by screen cutting when the terminal is in the left landscape state may be as shown in fig. 2D, in which case, the display region size of the terminal display screen is 1080 × 2280, and the size of the first screen cut picture is 1070 × 2260, where the first screen cut picture has an a point coordinate of (0,0), a B point coordinate of (2260,0), a C point coordinate of (2260,1070), and a D point coordinate of (0,1070). At this time, if the terminal moves the first screen capture area according to the offset value P (for example, where P is 5) and the offset direction (horizontal right movement), the second screen capture area can be obtained. In the second screen-cut region, the coordinates of the point a 'are (5,0), the coordinates of the point B' are (2265,0), the coordinates of the point C 'are (2265,1075), and the coordinates of the point D' are (5,1075), so it can be understood that, at this time, in the first screen-cut picture, the coordinates of the point a 'are (5,0), the coordinates of the point B' are (2265,0), the coordinates of the point C 'are (2265,1075), and the coordinates of the point D' are (5,1075).
For another example, when the terminal does not move the first screen cut region, the first screen cut picture obtained by screen-cutting when the terminal is in the right landscape state may be as shown in fig. 2E, in which case the display region size of the terminal display screen is 1080 × 2280, and the size of the first screen cut picture is 1075 × 2260, where the coordinates of the point a ' of the first screen cut picture is (2,0), the coordinates of the point B ' of the first screen cut picture is (2262,0), and the coordinates of the point C ' of the first screen cut picture is (2262,1070). At this time, if the terminal moves the first screen capture region in the offset direction (horizontally leftward movement) according to the offset value P (for example, where P is 3), the second screen capture region may be obtained. In the second screen-cut region, the coordinates of the point a 'are (5,0), the coordinates of the point B' are (2265,0), the coordinates of the point C 'are (2265,1075), and the coordinates of the point D' are (5,1075), so it can be understood that, at this time, in the first screen-cut picture, the coordinates of the point a 'are (5,0), the coordinates of the point B' are (2265,0), the coordinates of the point C 'are (2265,1075), and the coordinates of the point D' are (5,1075).
It can be understood that, by adopting the method, the screenshot pictures obtained by the terminal in the left horizontal screen state and the right horizontal screen state are consistent, and the problem that in the prior art, the screenshot pictures obtained after the screenshot operation is executed when the terminal is in the left horizontal screen state and the right horizontal screen state are inconsistent can be solved.
Optionally, after step S101 and before step S102, step S104 to step S105 may also be executed, specifically, refer to fig. 3, which is a schematic flow diagram of a screen capturing method according to another embodiment of the present invention, and the step S104 to step S105 are described in detail below.
Step S104, if the fact that the terminal display interface comprises the floating window is detected, acquiring an operation gesture of a user for the floating window;
in the embodiment of the present invention, the floating window includes, but is not limited to, a small window, an advertisement window, and the like of an application installed on the terminal in a certain state, and the embodiment of the present invention is not particularly limited.
When the terminal detects that the floating window is included in the terminal display interface, the user performs an operation gesture on the floating window, for example, the operation gesture includes but is not limited to: z-type traces, S-type traces, etc., and embodiments of the present invention are not limited in particular.
And S105, removing and displaying the floating window if the operation gesture is matched with a preset operation gesture.
For example, the operation gesture of the user for the floating window is an S-shaped track, the terminal determines that the current operation gesture matches a preset operation gesture, and the floating window is removed and displayed. That is, the floating window is not displayed on the display screen of the terminal.
In the embodiment of the invention, after the terminal receives the screen capture request input by the user for the terminal display interface, the terminal detects whether the display interface of the terminal contains the floating window (for example, the floating window is instant communication information received by the WeChat application program), and if the terminal detects that the display interface of the terminal contains the floating window, the terminal determines whether the floating window is displayed according to the acquired operation gesture for the floating window, so that the situation that when the terminal responds to the screen capture request, the first screen capture picture obtained by executing the screen capture operation contains other things which are not interested by the user, for example, the floating window, can better meet the requirements of the user, and improve the use experience of the user; and if the terminal does not detect the floating window, directly executing screen capture operation.
For example, the terminal captures a screen of a game video played by the terminal according to a preset screen capture parameter, a first screen capture picture obtained by the terminal performing the screen capture operation includes a floating window (for example, the floating window is instant messaging information received by a WeChat application), and the floating window shields a character to be identified, in this case, when the terminal needs to identify the character in the game video picture, a background blurring operation needs to be performed on an image area where the floating window is located or an image area where the floating window is located needs to be removed, which increases difficulty of the terminal in identifying the character undoubtedly. Accordingly, the first screenshot picture does not include the floating window, so that the difficulty of the terminal in recognizing the role can be reduced.
For another example, the terminal performs a screen capturing operation on a comic character cauma displayed on a display screen of the terminal according to preset screen capturing parameters, where a first screen capturing picture obtained by the screen capturing operation includes a floating window (for example, the floating window is instant messaging information received by the wechat application), and the floating window blocks the comic character cauma, so that in this case, since the first screen capturing picture does not meet the user's requirement, at this time, the user initiates a screen capturing request again to obtain a new first screen capturing picture, which undoubtedly brings a poor screen capturing experience to the user. Correspondingly, the first screenshot picture does not contain the floating window, so that a better screenshot experience can be brought to a user.
By implementing the embodiment of the invention, the terminal detects whether the display interface of the terminal contains the floating window before the screen capturing operation is executed, and determines whether to cancel displaying the floating window according to the operation gesture when the display interface of the terminal contains the floating window, so that the situation that the first screen capturing picture obtained by executing the screen capturing operation contains the things which are not interested by the user can be avoided.
Optionally, after step S102, the terminal may further execute step S106: and displaying the first screen picture in a preset preview mode.
In the specific implementation, after the terminal obtains the first screenshot picture by using the method, the terminal displays the first screenshot picture in a preset preview mode so that a user can judge whether the currently obtained first screenshot picture meets the self requirement or not, and the user does not need to open an album application program and check the first screenshot picture to perform judgment operation. When the user judges that the current first screenshot picture does not meet the self requirement, the user can initiate the screenshot request again to obtain the self-satisfied screenshot picture, and the screenshot efficiency of the terminal can be improved.
In order to better implement the method of the embodiment of the present invention, the embodiment of the present invention further describes a schematic structural diagram of a news pushing apparatus, which belongs to the same inventive concept as the method embodiment described in fig. 1A to fig. 4. The following detailed description is made with reference to the accompanying drawings: as shown in fig. 5A, the screen capture apparatus 500 may include: a receiving unit 501 and a screen capture unit 502;
the receiving unit 501 is configured to receive a screen capture request input by a user for a terminal display interface;
the screen capture unit 502 is configured to capture the content of a first screen capture area in the terminal display interface according to the screen capture parameter to obtain a first screen capture picture; and the screen capture parameters are determined according to the size of the terminal display screen.
Optionally, as shown in fig. 5B, the screen capture apparatus 500 further includes: a calculation unit 503;
the calculating unit 503 is configured to, in response to the screen capture request, perform screen capture on the content of a first screen capture area in the terminal display interface according to the screen capture parameter, and before obtaining a first screen capture picture, calculate a second screen capture area according to the first screen capture area, the offset value P, and the offset direction; wherein, P is a positive integer greater than 0.
The screen capture unit is specifically configured to:
and capturing the content of the second screen capturing area in the terminal display interface to obtain the first screen capturing picture.
Optionally, as shown in fig. 5C, the screen capture apparatus 500 further includes: a setting unit 504;
the setting unit 504 is configured to obtain a size of the terminal display screen, and set the screen capture parameter according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in a display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen;
optionally, the first screen-cut region is located in a display region of the terminal display screen, and includes:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate satisfies a preset length, the distance between the second coordinate and the sixth coordinate satisfies the preset length, the distance between the third coordinate and the seventh coordinate meets the preset length, and the distance between the fourth coordinate and the eighth coordinate meets the preset length.
Optionally, as shown in fig. 5D, the screen capture apparatus 500 further includes: an acquisition unit 505 and a removal unit 506;
the obtaining unit 505 is configured to, after the receiving unit 501 receives a screen capture request input by a user for a terminal display interface, enable the screen capture unit 502 to respond to the screen capture request, capture a screen of content in the terminal display interface according to a first screen capture area corresponding to a screen capture parameter, and obtain an operation gesture of the user for a floating window before obtaining a first screen capture picture and when detecting that the terminal display interface includes the floating window;
the removing unit 506 is configured to remove and display the floating window when the operation gesture matches a preset operation gesture.
According to the embodiment of the invention, the screen capture device can be suitable for terminals with different models and display screen sizes, and can avoid black edges and/or transparent edges in the screen capture pictures obtained by terminal screen capture.
In order to better implement the above scheme of the embodiment of the present invention, the present invention further provides another schematic structural diagram of the terminal, and the following detailed description is provided with reference to the accompanying drawings:
in order to better implement the above scheme of the embodiment of the present invention, the present invention further provides another schematic structural diagram of the terminal, and the following detailed description is made with reference to the accompanying drawings:
as shown in fig. 6, which is a schematic structural diagram of another terminal provided in the embodiment of the present invention, the terminal 600 may include at least one processor 601, a communication bus 602, a memory 603, and at least one communication interface 604.
Processor 601 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application-Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to control the execution of programs in accordance with the present invention.
The communication bus 602 may include a path that conveys information between the aforementioned components. The communication interface 604 may be implemented using any transceiver or other communication network, such as ethernet, Radio Access Technology (RAN), Wireless Local Area Network (WLAN), etc.
The Memory 603 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The memory 603 is used for storing program codes for implementing the present invention, and is controlled by the processor 601. The processor 601 is configured to execute the program code stored in the memory 603, and perform the following steps:
receiving a screen capture request input by a user aiming at a terminal display interface;
responding to the screen capture request, and capturing the content of a first screen capture area in the terminal display interface according to the screen capture parameters to obtain a first screen capture picture; and the screen capture parameters are determined according to the size of the terminal display screen.
The processor 601 is configured to respond to the screen capture request, and perform screen capture on the content of the first screen capture area in the terminal display interface according to the screen capture parameter, before obtaining the first screen capture picture, further including:
calculating according to the first screen capture area, the offset value P and the offset direction to obtain a second screen capture area; wherein, P is a positive integer greater than 0;
the processor 601 is configured to capture the content of the first screenshot area in the terminal display interface according to the screenshot parameter to obtain a first screenshot picture, and may include:
and capturing the content of the second screen capturing area in the terminal display interface to obtain the first screen capturing picture.
Wherein the processor 601 is further configured to:
acquiring the size of the terminal display screen, and setting the screen capture parameters according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in the display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen.
Wherein, the first screen cutting area is located in the display area of the terminal display screen, and comprises:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate satisfies a preset length, the distance between the second coordinate and the sixth coordinate satisfies the preset length, the distance between the third coordinate and the seventh coordinate meets the preset length, and the distance between the fourth coordinate and the eighth coordinate meets the preset length.
After receiving a screen capture request input by a user for a terminal display interface, the processor 601 is configured to respond to the screen capture request, and capture a screen of content in the terminal display interface according to a first screen capture area corresponding to a screen capture parameter, before obtaining a first screen capture picture, and may further include:
if the fact that the terminal display interface comprises the floating window is detected, acquiring an operation gesture of a user for the floating window;
and if the operation gesture is matched with a preset operation gesture, removing and displaying the floating window.
In particular implementations, processor 601 may include one or more CPUs, such as CPU0 and CPU1 in fig. 6, as an alternative embodiment.
In an alternative implementation, terminal 600 may include multiple processors, such as processor 601 and processor 608 of fig. 6. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In this implementation, as an alternative embodiment, the terminal 600 may further include an output device 605 and an input device 606. Output device 605 is in communication with processor 601 and may display information in a variety of ways. For example, the output device 605 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) Display device, a Cathode Ray Tube (CRT) Display device, a projector (projector), or the like. The input device 606 is in communication with the processor 601 and may accept user input in a variety of ways. For example, the input device 606 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
In a specific implementation, the terminal 600 may include a Mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), an intelligent wearable Device (e.g., a smart watch, a smart bracelet), and other terminals that can be used by various users, and the embodiment of the present invention is not limited in particular.
Embodiments of the present invention also provide a computer storage medium for storing computer software instructions for the terminal shown in fig. 1A to 4, which includes a program for executing the method embodiments. By executing the stored program, the screen capture of the content in the terminal display interface can be realized.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A screen capture method, comprising:
receiving a screen capture request input by a user aiming at a terminal display interface;
responding to the screen capture request, and determining a first screen capture area in the terminal display interface according to screen capture parameters; the screen capturing parameters are determined according to the size of a display screen of the terminal;
calculating to obtain a second screen capture area according to the first screen capture area, an offset value P and an offset direction, wherein the offset direction is the offset direction of the first screen capture area, and the offset value P is the offset value of the first screen capture area along the offset direction; wherein, P is a positive integer greater than 0;
and capturing the content of the second screen capturing area in the terminal display interface to obtain a first screen capturing picture.
2. The method of claim 1, further comprising:
acquiring the size of the terminal display screen, and setting the screen capture parameters according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in the display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen.
3. The method of claim 2, wherein the first screen area is located within a display area of a display screen of the terminal, comprising:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate is less than a preset length, the distance between the second coordinate and the sixth coordinate is less than the preset length, the distance between the third coordinate and the seventh coordinate is smaller than the preset length, and the distance between the fourth coordinate and the eighth coordinate is smaller than the preset length.
4. The method according to claim 1, wherein after receiving a screen capture request input by a user for a terminal display interface, responding to the screen capture request, capturing a screen of content in the terminal display interface according to a first screen capture area corresponding to a screen capture parameter, and before obtaining a first screen capture picture, further comprising:
if the fact that the terminal display interface comprises the floating window is detected, acquiring an operation gesture of a user for the floating window;
and if the operation gesture is matched with a preset operation gesture, removing and displaying the floating window.
5. A screen capture device, comprising:
the receiving unit is used for receiving a screen capture request input by a user aiming at a terminal display interface;
the screen capture unit is used for responding to the screen capture request and determining a first screen capture area in the terminal display interface according to screen capture parameters; the screen capturing parameters are determined according to the size of a display screen of the terminal;
the calculation unit is used for calculating to obtain a second screen capture area according to the first screen capture area, an offset value P and an offset direction, wherein the offset direction is the offset direction of the first screen capture area, and the offset value P is the offset value of the first screen capture area along the offset direction; wherein, P is a positive integer greater than 0;
the screen capture unit is further configured to capture the content of the second screen capture area in the terminal display interface to obtain a first screen capture picture.
6. The screen capture device of claim 5, further comprising: a setting unit;
the setting unit is used for acquiring the size of the terminal display screen and setting the screen capture parameters according to the size of the terminal display screen; the screen capturing parameter is used for determining the first screen capturing area, and the first screen capturing area is located in the display area of the terminal display screen, or the first screen capturing area is equal to the display area of the terminal display screen.
7. The screen capturing device of claim 5, wherein the first screen capturing area is located in a display area of the terminal display screen, and comprises:
the first screen capture area is a regular closed area surrounded by vertexes of a first coordinate, a second coordinate, a third coordinate and a fourth coordinate, the display area of the terminal display screen is a regular closed area surrounded by the vertexes of a fifth coordinate, a sixth coordinate, a seventh coordinate and an eighth coordinate, the first coordinate corresponds to the fifth coordinate, the second coordinate corresponds to the sixth coordinate, the third coordinate corresponds to the seventh coordinate, the fourth coordinate corresponds to the eighth coordinate, and the distance between the first coordinate and the fifth coordinate is less than a preset length, the distance between the second coordinate and the sixth coordinate is less than the preset length, the distance between the third coordinate and the seventh coordinate is smaller than the preset length, and the distance between the fourth coordinate and the eighth coordinate is smaller than the preset length.
8. The screen capture device of claim 5, further comprising: an acquisition unit and a removal unit;
the acquiring unit is used for acquiring an operation gesture of a user for the floating window when the floating window is detected to be included in the terminal display interface;
the removing unit is used for removing and displaying the floating window when the operation gesture is matched with a preset operation gesture.
9. A terminal, comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-4.
10. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any of claims 1-4.
CN201811165565.XA 2018-09-30 2018-09-30 Screen capturing method, device, terminal and computer readable medium Active CN109144370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811165565.XA CN109144370B (en) 2018-09-30 2018-09-30 Screen capturing method, device, terminal and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811165565.XA CN109144370B (en) 2018-09-30 2018-09-30 Screen capturing method, device, terminal and computer readable medium

Publications (2)

Publication Number Publication Date
CN109144370A CN109144370A (en) 2019-01-04
CN109144370B true CN109144370B (en) 2022-04-29

Family

ID=64810291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811165565.XA Active CN109144370B (en) 2018-09-30 2018-09-30 Screen capturing method, device, terminal and computer readable medium

Country Status (1)

Country Link
CN (1) CN109144370B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324263B (en) * 2020-01-21 2021-09-03 维沃移动通信有限公司 Screen capture method, electronic equipment and computer readable storage medium
CN111290676B (en) * 2020-03-02 2021-02-12 北京金山安全软件有限公司 Method, device and equipment for intercepting picture of designated area in client
CN113687750B (en) * 2020-05-08 2023-10-27 腾讯科技(深圳)有限公司 Screenshot processing method and device
CN113723397B (en) * 2020-05-26 2023-07-25 华为技术有限公司 Screen capturing method and electronic equipment
CN112363787A (en) * 2020-10-30 2021-02-12 维沃软件技术有限公司 Image processing method and device and electronic equipment
CN113126862B (en) * 2021-03-15 2022-06-10 维沃移动通信有限公司 Screen capture method and device, electronic equipment and readable storage medium
CN114020387A (en) * 2021-11-03 2022-02-08 杭州逗酷软件科技有限公司 Terminal screen capturing method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105242827A (en) * 2015-09-28 2016-01-13 小米科技有限责任公司 Screen capture method, apparatus and system
CN106126057A (en) * 2016-06-16 2016-11-16 珠海市魅族科技有限公司 A kind of screenshot method, device and terminal unit
CN106598423A (en) * 2016-11-03 2017-04-26 深圳市金立通信设备有限公司 Screen capture method and terminal
CN106970754A (en) * 2017-03-28 2017-07-21 北京小米移动软件有限公司 The method and device of screenshotss processing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130052753A (en) * 2011-08-16 2013-05-23 삼성전자주식회사 Method of executing application using touchscreen and terminal supporting the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105242827A (en) * 2015-09-28 2016-01-13 小米科技有限责任公司 Screen capture method, apparatus and system
CN106126057A (en) * 2016-06-16 2016-11-16 珠海市魅族科技有限公司 A kind of screenshot method, device and terminal unit
CN106598423A (en) * 2016-11-03 2017-04-26 深圳市金立通信设备有限公司 Screen capture method and terminal
CN106970754A (en) * 2017-03-28 2017-07-21 北京小米移动软件有限公司 The method and device of screenshotss processing

Also Published As

Publication number Publication date
CN109144370A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109144370B (en) Screen capturing method, device, terminal and computer readable medium
US9430093B2 (en) Monitoring interactions between two or more objects within an environment
TWI624781B (en) Method, apparatus and computer program product for joining the displays of multiple devices
JP5628300B2 (en) Method, apparatus and computer program product for generating graphic objects with desirable physical features for use in animation
CN108737739B (en) Preview picture acquisition method, preview picture acquisition device and electronic equipment
US11061558B2 (en) Touch operation response method and device
KR20150059466A (en) Method and apparatus for recognizing object of image in electronic device
CN107608550B (en) Touch operation response method and device
US11086442B2 (en) Method for responding to touch operation, mobile terminal, and storage medium
CN111767554B (en) Screen sharing method and device, storage medium and electronic equipment
CN106325687B (en) Method and terminal for calling program
CN107204044B (en) Picture display method based on virtual reality and related equipment
US20140292724A1 (en) A display method, a display control method, and electric device
US11194425B2 (en) Method for responding to touch operation, mobile terminal, and storage medium
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
US10115012B1 (en) Capture object boundary jitter reduction
CN109873980B (en) Video monitoring method and device and terminal equipment
TWI684909B (en) User interface switching method, device and equipment
CN109358927B (en) Application program display method and device and terminal equipment
KR102303206B1 (en) Method and apparatus for recognizing object of image in electronic device
US20140111551A1 (en) Information-processing device, storage medium, information-processing method, and information-processing system
US20200142568A1 (en) Interaction mechanisms for pointer control
CN112596725A (en) Grading method and grading device for programming works, terminal equipment and storage medium
CN111506499A (en) Method and device for detecting availability of parameters in applet and electronic equipment
CN112306257B (en) Character deleting method and device and electronic equipment

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: 20191128

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Applicant after: Zhuhai Seal Interest Technology Co., Ltd.

Address before: 519070, No. 10, main building, No. six, science Road, Harbour Road, Tang Wan Town, Guangdong, Zhuhai, 601F

Applicant before: Zhuhai Juntian Electronic Technology Co.,Ltd.

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