CN114047985A - Screenshot method, screenshot device, storage medium and electronic equipment - Google Patents

Screenshot method, screenshot device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114047985A
CN114047985A CN202111228404.2A CN202111228404A CN114047985A CN 114047985 A CN114047985 A CN 114047985A CN 202111228404 A CN202111228404 A CN 202111228404A CN 114047985 A CN114047985 A CN 114047985A
Authority
CN
China
Prior art keywords
view
picture
screen
canvas
screenshot
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.)
Pending
Application number
CN202111228404.2A
Other languages
Chinese (zh)
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.)
Yancheng Tianyanchawei Technology Co ltd
Original Assignee
Yancheng Jindi 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 Yancheng Jindi Technology Co Ltd filed Critical Yancheng Jindi Technology Co Ltd
Priority to CN202111228404.2A priority Critical patent/CN114047985A/en
Publication of CN114047985A publication Critical patent/CN114047985A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a screenshot method, a screenshot device, a storage medium and electronic equipment, and aims to solve the technical problem that all page contents cannot be intercepted by the screenshot method in the related art. The method comprises the following steps: in response to receiving a screenshot instruction of a current page of an application program, capturing a picture of content displayed on a screen of electronic equipment by the current page to obtain a first picture; displaying the first picture as a first view on a view top layer of the screen; generating a second view positioned at the lower layer of the first view according to target content of the current page, wherein the target content comprises page content which is not displayed on the screen of the current page; creating a canvas according to the size of the second view, and intercepting a picture from the second view to obtain a second picture; and drawing the second picture into the canvas to obtain a target screenshot.

Description

Screenshot method, screenshot device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a screenshot method, apparatus, storage medium, and electronic device.
Background
As an important and convenient file format, the picture is a common element for people to communicate daily. In order to achieve the purposes of saving, forwarding, sharing and the like of pages, screenshot is a common operation when a user uses a terminal device such as a mobile phone.
In the related technology, if the content of the page to be captured exceeds the screen range, only part of the content in the screen range can be captured during screenshot, or the user needs to splice the screenshots of all parts of the content of the page. In addition, in the related art, the images can be captured and spliced only in the vertical direction, the page content exceeding the width of the screen cannot be captured, and the user requirements cannot be met.
Disclosure of Invention
The disclosure aims to provide a screenshot method, a screenshot device, a storage medium and electronic equipment, so as to solve the technical problem that the screenshot method in the related art cannot intercept all page contents.
In order to achieve the above object, a first aspect of the present disclosure provides a screenshot method, including:
in response to receiving a screenshot instruction of a current page of an application program, capturing a picture of content displayed on a screen of electronic equipment by the current page to obtain a first picture;
displaying the first picture as a first view on a view top layer of the screen;
generating a second view positioned at the lower layer of the first view according to target content of the current page, wherein the target content comprises page content which is not displayed on the screen of the current page;
creating a canvas according to the size of the second view, and intercepting a picture from the second view to obtain a second picture;
and drawing the second picture into the canvas to obtain a target screenshot.
Optionally, the creating the canvas according to the size of the second view includes:
creating the canvas according to the width and the height of the second view, wherein the width of the canvas is not less than the width of the second view and the height of the canvas is not less than the height of the second view; or the like, or, alternatively,
creating the canvas according to the width of the second view under the condition that the width of the second view is larger than the height of the second view, wherein the width and the height of the canvas are not smaller than the width of the second view; or the like, or, alternatively,
and under the condition that the height of the second view is larger than the width of the second view, creating the canvas according to the height of the second view, wherein neither the width nor the height of the canvas is smaller than the height of the second view.
Optionally, the intercepting a picture from the second view to obtain a second picture includes:
and under the condition that the width of the second view is smaller than or equal to the width of the screen and the height of the second view is larger than the height of the screen, vertically rolling from the top of the second view to the bottom of the second view, sequentially intercepting the second view by taking a preset module as a unit and splicing to obtain the second picture, wherein the preset module is smaller than or equal to the height of the screen.
Optionally, the intercepting a picture from the second view to obtain a second picture includes:
and when the height of the second view is smaller than or equal to the height of the screen and the width of the second view is larger than the width of the screen, the second view is transversely scrolled from one side of the second view to the other opposite side of the second view, and the second view is sequentially intercepted and spliced by taking a preset module as a unit to obtain the second picture, wherein the preset module is smaller than or equal to the width of the screen.
Optionally, the drawing the second picture into the canvas to obtain the target screenshot includes:
acquiring a corresponding preset picture according to the second picture;
adjusting the size of the canvas according to the size of the preset picture and the preset position relation between the preset picture and the second picture;
and drawing the second picture and the preset picture into the adjusted canvas according to the preset position relation so as to obtain the target screenshot.
Optionally, the drawing the second picture into the canvas to obtain the target screenshot includes:
and drawing the second picture into the canvas, and adding a watermark on the canvas to obtain the target screenshot with the watermark.
Optionally, the generating, by the first view, a second view underlying the first view according to the target content of the current page includes:
and screening out the target content relevant to the query statement from all contents of the current page.
Optionally, the screening out the target content related to the query statement from all the contents of the current page includes:
deleting at least one of a blank content part, an advertisement content part and an operation control from the whole content of the current page to obtain the target content related to the query statement.
Optionally, the method further comprises:
before the picture of the content displayed on the screen of the electronic equipment by the current page is captured, determining that the capture instruction is directed to the whole content of the current page.
A second aspect of the present disclosure also provides a screenshot device, the device comprising:
the first intercepting module is used for responding to a received screenshot instruction of a current page of an application program, intercepting a picture of content displayed on a screen of the electronic equipment by the current page, and obtaining a first picture;
the display module is used for displaying the first picture as a first view on the view top layer of the screen;
a generating module, configured to generate a second view located below the first view according to target content of the current page, where the target content includes page content of the current page that is not displayed on the screen;
the second intercepting module is used for creating a canvas according to the size of the second view and intercepting a picture of the second view to obtain a second picture;
and the drawing module is used for drawing the second picture into the canvas to obtain the target screenshot.
The third aspect of the present disclosure also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the above first aspects.
A fourth aspect of the present disclosure also provides an electronic device, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the first aspects above.
Through the technical scheme, the following technical effects can be at least achieved:
the method comprises the steps of firstly, responding to a received screenshot instruction of a current page of an application program, intercepting a picture of content displayed on a screen of the electronic equipment by the current page to obtain a first picture, then displaying the first picture as a first view on the top view layer of the screen, secondly, generating a second view positioned on the lower layer of the first view according to target content of the current page, wherein the target content comprises page content which is not displayed on the screen by the current page, then creating a canvas according to the size of the second view, intercepting the picture of the second view to obtain a second picture, and finally, drawing the second picture into the canvas to obtain a target screenshot. By the method, all contents of the current page can be subjected to screenshot in response to the screenshot instruction of the current page, and the user requirements are met. Moreover, the content displayed on the screen of the current page is intercepted and displayed on the top layer of the view, and a user does not sense the process of intercepting all the page content, so that the user experience is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a schematic flowchart of a screenshot method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic illustration of a second view provided by an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of another second view provided by an embodiment of the present disclosure;
fig. 4 is a schematic diagram of adding a picture according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart diagram illustrating another screenshot method provided by an embodiment of the present disclosure;
FIG. 6 is a block diagram of a screenshot device provided by an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect. The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units. It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
In daily life, a user can browse and process various information by using electronic equipment, and intercept required information for the user in a screenshot mode and store or release the information. However, if the content of the page to be captured exceeds the display range of the screen, the user can capture only a part of the content of the page displayed on the current screen, and the requirement of the user for capturing all the content of the page cannot be met. At present, in the related art, vertical scrolling can be performed on a page to respectively capture pictures to be spliced into long pictures, but page content exceeding the width of a screen cannot be captured. In addition, when the page contains blank content, advertisement content, operation controls and other content, the user only wants to keep the required information, and only needs to edit the image after intercepting the image, which is tedious to operate and requires the user to have certain image editing capability.
In view of the above, the present disclosure provides a screenshot method, device, storage medium and electronic device to solve the above problems.
Before describing detailed embodiments of the technical solution of the present disclosure, an application scenario of the technical solution of the present disclosure is described below.
The screenshot method provided by the embodiment of the present disclosure may be applied to electronic devices such as a mobile phone and a tablet computer, which may be installed with an application program, and includes an iOS operating system and an Android operating system, where a user performs screenshot for the application program, and a screenshot instruction may be triggered by an operation button on a page, or may be triggered according to a set operation, such as a sliding operation and a long-press operation, and the disclosure does not specifically limit this.
The following provides a detailed description of embodiments of the present disclosure.
The embodiment of the disclosure provides a screenshot method, which includes:
s101, in response to receiving a screenshot instruction of a current page of an application program, capturing a picture of content displayed on a screen of the electronic equipment by the current page to obtain a first picture.
S102, displaying the first picture as a first view on the view top layer of the screen.
S103, generating a second view positioned at the lower layer of the first view according to the target content of the current page.
Wherein the target content comprises page content of which the current page is not displayed on the screen. Also, since the first view is at the top view level of the screen, the second view is not visible to the user, i.e., the process of screenshot is not visible to the user before the target screenshot is generated.
And S104, creating a canvas according to the size of the second view, and intercepting a picture from the second view to obtain a second picture.
S105, drawing the second picture into the canvas to obtain a target screenshot.
By adopting the method, firstly, the picture of the content displayed on the screen of the electronic equipment by the current page is intercepted to obtain the first picture by responding to the received screenshot instruction of the current page of the application program, then the first picture is displayed on the view top layer of the screen as the first view, secondly, the second view positioned at the lower layer of the first view is generated according to the target content of the current page, wherein the target content comprises the page content which is not displayed on the screen by the current page, then the canvas is created according to the size of the second view, the picture of the second view is intercepted to obtain the second picture, and finally, the second picture is drawn into the canvas to obtain the target screenshot. By the method, all contents of the current page can be subjected to screenshot in response to the screenshot instruction of the current page, and the user requirements are met. Moreover, the content displayed on the screen of the current page is intercepted and displayed on the top layer of the view, and a user does not sense the process of intercepting all the page content, so that the user experience is improved.
In order to make those skilled in the art understand the screenshot method provided by the present disclosure, the following detailed description is made for each step.
It is worth noting that the screenshot can be performed not only on all the content of the current page, but also on a part of the area of the current page. Therefore, before capturing a picture of the content of the current page displayed on the screen of the electronic device, it is necessary to determine that the screenshot command is directed to the entire content of the current page.
For example, taking an example that a screenshot button is arranged on a page and used for triggering a screenshot instruction, after a user clicks the screenshot button, a drop-down menu is displayed and part of screenshots or all screenshots can be selected. When the user selects the area screenshot, an area selection box is displayed on the screen, and the user can select the area and the size needing screenshot in the sliding area selection box on the screen. When the user selects all screenshots, the screenshot operation of all contents of the current page can be automatically completed without other operations of the user. Therefore, the requirements of the user for carrying out partial screenshot can be met, and the requirements of the user for carrying out screenshot on all the page contents beyond the screen display can also be met.
In a possible mode, the current page is a query result page displayed based on a query statement of a user, and target content related to the query statement is screened out from all content of the current page before a second view positioned at the lower layer of the first view is generated according to the target content of the current page. For example, at least one of the blank content portion, the advertising content portion, and the operation control is deleted from the entire content of the current page to obtain the target content related to the query statement.
Illustratively, as shown in fig. 2, after the query result page displayed based on the query statement of the user exceeds the display area of the screen, after the first view is generated and displayed on the top view layer of the screen, the target content related to the query statement is screened from the entire content of the current page, for example, blank content parts, advertisement content parts, operation controls, and the like, which need not be intercepted by the user, are deleted, in other words, the page is re-laid according to the data source required by the user, and the adjusted second view is obtained. Therefore, when the subsequent screenshot operation is carried out, data irrelevant to the user requirement cannot be intercepted, so that the user is prevented from manually modifying the picture after screenshot, the operation is more convenient, and the user experience is improved.
In addition, after the target content is re-screened, when the page is re-laid, the second view can be obtained by scaling the target content in equal proportion, so that the display width of the target content does not exceed the width of the screen, or the display height of the target content does not exceed the height of the screen, and the long picture or the wide picture can be conveniently intercepted aiming at the second view. And creating a canvas according to the size of the second view as a drawing container of the picture obtained by cutting out the second view.
Illustratively, a canvas may be created from the width and height of the second view, wherein the width of the canvas is not less than the width of the second view and the height of the canvas is not less than the height of the second view. Alternatively, where the width of the second view is greater than the height of the second view, a canvas may be created from the width of the second view, where neither the width nor the height of the canvas is less than the width of the second view. Still alternatively, where the height of the second view is greater than the width of the second view, a canvas may be created according to the height of the second view, where neither the width nor the height of the canvas is less than the height of the second view. That is, the canvas is sized to render the picture from the second view. Preferably, it may be that the width of the canvas is equal to the width of the second view and the height of the canvas is equal to the height of the second view.
In a possible mode, when the width of the second view is smaller than or equal to the width of the screen and the height of the second view is larger than the height of the screen, the second view is vertically scrolled from the top of the second view to the bottom of the second view, and the second view is sequentially cut and spliced by taking a preset module as a unit to obtain a second picture, wherein the preset module is smaller than or equal to the height of the screen.
Illustratively, as shown in FIG. 2, the rearranged second view has a width that does not exceed the width of the screen and a height that is greater than the height of the screen. At this time, the content displayed in the second view can be sequentially cut out in units of preset modules from the top of the second view to the bottom of the second view. In the intercepting process, when the displayed content is larger than the height of the screen, the content displayed by the current screen is intercepted by taking the height of the screen as a unit, the content is scrolled to the next screen height after the interception is finished, and the content is intercepted in sequence until the content is scrolled to the bottom of the screen. And in the case that the height of the last uncut content is less than the height of the screen, the picture is cut by taking the height of the actual content display as a unit. And finally, splicing all the cut pictures according to the cut sequence to obtain a long picture as a second picture.
Or, when the height of the second view is less than or equal to the height of the screen and the width of the second view is greater than the width of the screen, the second view is transversely scrolled from one side of the second view to the opposite side of the second view, and the second view is sequentially cut and spliced by taking a preset module as a unit to obtain a second picture, wherein the preset module is less than or equal to the width of the screen.
Correspondingly, according to the same principle of intercepting the long picture, in the case that the height of the second view after the rearrangement does not exceed the height of the screen and the width is greater than the width of the screen, the second view can be transversely scrolled from the left side of the second view to the right side of the second view, and the content displayed by the second view is intercepted in sequence by taking the preset module as a unit. In the intercepting process, when the displayed content is larger than the width of the screen, the content displayed by the current screen is intercepted by taking the width of the screen as a unit, the intercepted content is scrolled to the content with the next screen width, and the intercepted content is sequentially intercepted until the intercepted content is scrolled to the right side of the screen. And, in the case that the last uncut content width is smaller than the screen width, the picture is cut out in units of the width of the actual content display. And finally, splicing all the cut pictures according to the cut sequence to obtain a wide picture as a second picture.
By the method, the screenshot operation of all the page contents can be completed under the condition that a user does not sense the screenshot operation, the long picture can be intercepted, the wide picture can be intercepted, the long picture or the wide picture can be automatically intercepted according to the length-width ratio of the displayed contents without manual operation of the user, namely, the user can complete the screenshot operation of all the page contents without any operation after triggering a screenshot instruction, the operation is simple, and the user experience is good.
In other possible approaches, when the page is re-laid out after re-screening the target content, the target content is not scaled equally, but a second view is obtained at the size of the actual display of the target content. In this case, as shown in fig. 3, if the width of the second view exceeds the width of the screen and the height of the second view exceeds the height of the screen, the left-to-right pictures can be cut by scrolling transversely first, then the next screen height is scrolled, then the left-to-right pictures can be cut by scrolling transversely until the bottom of the second view is scrolled, that is, the pictures are cut in the sequence of "region 1, region 2, region 3, and region 4", the position of each picture in the second view is marked, and finally the cut pictures are spliced according to the marked positions to obtain the second picture. Or the picture is firstly cut through vertically rolling, that is, the picture is cut through according to the sequence of "area 1, area 3, area 2 and area 4", which is not specifically limited by the present disclosure.
It should be noted that, in the above embodiment, no matter whether the target content is scaled to obtain the second view, the content of the second view may be directly captured as the second picture when the height of the second view does not exceed the height of the screen and the width of the second view does not exceed the width of the screen. Moreover, the screenshot sequence of the above embodiment is only used as an exemplary illustration, and cannot be used to limit the screenshot sequence of the embodiment of the present disclosure, and the embodiment of the present disclosure may also sequentially intercept and splice the long pictures from the bottom to the top of the second view, and may also sequentially intercept and splice the wide pictures from the right side to the left side of the second view, and the like, which is not specifically limited by the present disclosure.
After the second image is captured and spliced to obtain the second image, the second image can be processed according to different application scenes to obtain the target screenshot.
In a possible mode, firstly, a corresponding preset picture is obtained according to the second picture, then, the size of the canvas is adjusted according to the size of the preset picture and the preset position relation between the preset picture and the second picture, and finally, the second picture and the preset picture are drawn into the adjusted canvas according to the preset position relation so as to obtain the target screenshot.
For example, as shown in fig. 4, a header picture may be designed for each page of the application, for example, when an interface of company information is queried, the header picture displays XX company information, where XX company may display a company name selected according to a query condition of a user. And, according to the size of the second picture, selecting a corresponding header picture, or performing scaling processing on the header picture according to the size of the second picture, so as to adapt the header picture to the size of the second picture, taking fig. 4 as an example, the width of the header picture needs to be consistent with the width of the second picture.
In addition, a picture at the end of the list can be added, and the position of adding the picture is not particularly limited in the disclosure. Further, after the preset picture to be added is determined, the size of the canvas is adjusted according to the size of the preset picture, and the preset picture and the second picture are drawn into the adjusted canvas according to the preset display position of the preset picture, so that the target screenshot is obtained. Or, when the canvas is created, the appropriate canvas can be directly created according to the size of the second view and the size of the preset picture, so that the canvas is prevented from being adjusted, and the operation is simplified.
By the method, the required additional information can be added to the second picture to obtain the target screenshot, for example, the header picture is added to the header according to the interface where the user is located and the inquired content, so that the user can know the content corresponding to the screenshot according to the header picture. Or the two-dimensional code of the application program can be added at the tail of the form, so that after the user saves or shares the screenshot, the user can scan the two-dimensional code to quickly enter the interface of the application program, and the like.
In addition, the second picture can be drawn into the canvas, and the watermark is added on the canvas to obtain the target screenshot with the watermark, wherein the watermark can be used for identifying the source of the picture, and can also prevent other people from modifying the content of the picture after obtaining the screenshot, so that the security of the screenshot is improved.
In other possible implementation manners, after the target screenshot is obtained, the user can edit, store, share the target screenshot to a third-party application and the like, and the basic processing requirements of the user on the picture information are met.
In order to make the method provided by the embodiment of the present disclosure more easily understood by those skilled in the art, the following describes in detail the steps of the screenshot method provided by the embodiment of the present disclosure. As shown in fig. 5, the method includes:
s501, in response to receiving a screenshot instruction of a current page of an application program, capturing a picture of content displayed on a screen of the electronic equipment by the current page to obtain a first picture.
And S502, displaying the first picture as a first view on the view top layer of the screen.
S503, screening out target content relevant to the query statement from all the content of the current page, and generating a second view positioned at the lower layer of the first view.
And S504, creating a canvas according to the size of the second view.
And S505, sequentially taking the preset module as a unit to intercept the pictures of the second view and splicing the pictures to obtain a second picture.
S506, adjusting the canvas according to the sizes of the preset picture and the second picture.
And S507, drawing the preset picture and the second picture into the adjusted canvas, and adding the watermark to obtain the target screenshot.
By the method, the user can complete the screenshot operation of all the page contents under the condition that the user does not perceive under the condition that the user does not need to trigger the screenshot command and follow-up operation, and the page contents are screened, and only the contents inquired by the user are screened out for screenshot operation. In addition, the content and the watermark can be added to the intercepted picture, the operation is simple, and the user experience is good.
FIG. 6 is a block diagram illustrating a screenshot device in accordance with an exemplary embodiment. As shown in fig. 7, the apparatus 600 includes:
the first capture module 601 is configured to capture a picture of content displayed on a screen of the electronic device on a current page of an application program in response to receiving a capture instruction for the current page, so as to obtain a first picture.
A display module 602, configured to display the first picture as a first view on a top view layer of the screen.
A generating module 603, configured to generate a second view located below the first view according to target content of the current page, where the target content includes page content of the current page that is not displayed on the screen.
And a second clipping module 604, configured to create a canvas according to the size of the second view, and clip a picture of the second view to obtain a second picture.
And a drawing module 605, configured to draw the second picture into the canvas to obtain the target screenshot.
By adopting the device, firstly, the picture of the content displayed on the screen of the electronic equipment by the current page is intercepted to obtain the first picture by responding to the received screenshot instruction of the current page of the application program, then the first picture is displayed on the view top layer of the screen as the first view, secondly, the second view positioned at the lower layer of the first view is generated according to the target content of the current page, wherein the target content comprises the page content which is not displayed on the screen by the current page, then the canvas is created according to the size of the second view, the picture of the second view is intercepted to obtain the second picture, and finally, the second picture is drawn into the canvas to obtain the target screenshot. By the device, all contents of the current page can be subjected to screenshot in response to the screenshot instruction of the current page, and the user requirements are met. Moreover, the content displayed on the screen of the current page is intercepted and displayed on the top layer of the view, and a user does not sense the process of intercepting all the page content, so that the user experience is improved.
Optionally, the second intercepting module 604 is configured to:
creating the canvas according to the width and the height of the second view, wherein the width of the canvas is not less than the width of the second view and the height of the canvas is not less than the height of the second view; or the like, or, alternatively,
creating the canvas according to the width of the second view under the condition that the width of the second view is larger than the height of the second view, wherein the width and the height of the canvas are not smaller than the width of the second view; or the like, or, alternatively,
and under the condition that the height of the second view is larger than the width of the second view, creating the canvas according to the height of the second view, wherein neither the width nor the height of the canvas is smaller than the height of the second view.
Optionally, the second intercept module 604 is configured to:
and under the condition that the width of the second view is smaller than or equal to the width of the screen and the height of the second view is larger than the height of the screen, vertically rolling from the top of the second view to the bottom of the second view, sequentially intercepting the second view by taking a preset module as a unit and splicing to obtain the second picture, wherein the preset module is smaller than or equal to the height of the screen.
Optionally, the second intercept module 604 is configured to:
and when the height of the second view is smaller than or equal to the height of the screen and the width of the second view is larger than the width of the screen, the second view is transversely scrolled from one side of the second view to the other opposite side of the second view, and the second view is sequentially intercepted and spliced by taking a preset module as a unit to obtain the second picture, wherein the preset module is smaller than or equal to the width of the screen.
Optionally, the drawing module 605 is configured to:
acquiring a corresponding preset picture according to the second picture;
adjusting the size of the canvas according to the size of the preset picture and the preset position relation between the preset picture and the second picture;
and drawing the second picture and the preset picture into the adjusted canvas according to the preset position relation so as to obtain the target screenshot.
Optionally, the drawing module 605 is configured to:
and drawing the second picture into the canvas, and adding a watermark on the canvas to obtain the target screenshot with the watermark.
Optionally, the current page is a query result page displayed based on a query statement of a user, and before the generating a second view located at a lower layer of the first view according to the target content of the current page, the apparatus 600 further includes:
and the screening module is used for screening the target content related to the query statement from all the contents of the current page.
Optionally, the screening module is configured to:
deleting at least one of a blank content part, an advertisement content part and an operation control from the whole content of the current page to obtain the target content related to the query statement.
Optionally, the apparatus 600 further comprises:
and the determining module is used for determining that the screenshot instruction is directed at all contents of the current page before the screenshot picture of the contents displayed on the screen of the electronic equipment by the current page.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The embodiments of the present disclosure also provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the screenshot method provided in the foregoing embodiments.
An embodiment of the present disclosure further provides an electronic device, including:
a memory having a computer program stored thereon;
and the processor is used for executing the computer program in the memory to realize the steps of the screenshot method provided by the embodiment.
Fig. 7 is a block diagram illustrating an electronic device 700 in accordance with an example embodiment. As shown in fig. 7, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the screenshot method. The memory 702 is used to store various types of data to support operation at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 705 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described screen capture method.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described screenshot method is also provided. For example, the computer readable storage medium may be the memory 702 comprising program instructions executable by the processor 701 of the electronic device 700 to perform the screenshot method described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the screenshot method described above when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (12)

1. A method of screenshot, the method comprising:
in response to receiving a screenshot instruction of a current page of an application program, capturing a picture of content displayed on a screen of electronic equipment by the current page to obtain a first picture;
displaying the first picture as a first view on a view top layer of the screen;
generating a second view positioned at the lower layer of the first view according to target content of the current page, wherein the target content comprises page content which is not displayed on the screen of the current page;
creating a canvas according to the size of the second view, and intercepting a picture from the second view to obtain a second picture;
and drawing the second picture into the canvas to obtain a target screenshot.
2. The method of claim 1, wherein creating the canvas according to the size of the second view comprises:
creating the canvas according to the width and the height of the second view, wherein the width of the canvas is not less than the width of the second view and the height of the canvas is not less than the height of the second view; or the like, or, alternatively,
creating the canvas according to the width of the second view under the condition that the width of the second view is larger than the height of the second view, wherein the width and the height of the canvas are not smaller than the width of the second view; or the like, or, alternatively,
and under the condition that the height of the second view is larger than the width of the second view, creating the canvas according to the height of the second view, wherein neither the width nor the height of the canvas is smaller than the height of the second view.
3. The method of claim 1, wherein the step of truncating the picture from the second view to obtain a second picture comprises:
and under the condition that the width of the second view is smaller than or equal to the width of the screen and the height of the second view is larger than the height of the screen, vertically rolling from the top of the second view to the bottom of the second view, sequentially intercepting the second view by taking a preset module as a unit and splicing to obtain the second picture, wherein the preset module is smaller than or equal to the height of the screen.
4. The method of claim 1, wherein the step of truncating the picture from the second view to obtain a second picture comprises:
and when the height of the second view is smaller than or equal to the height of the screen and the width of the second view is larger than the width of the screen, the second view is transversely scrolled from one side of the second view to the other opposite side of the second view, and the second view is sequentially intercepted and spliced by taking a preset module as a unit to obtain the second picture, wherein the preset module is smaller than or equal to the width of the screen.
5. The method of any of claims 1-4, wherein the drawing the second picture into the canvas to obtain the target screenshot comprises:
acquiring a corresponding preset picture according to the second picture;
adjusting the size of the canvas according to the size of the preset picture and the preset position relation between the preset picture and the second picture;
and drawing the second picture and the preset picture into the adjusted canvas according to the preset position relation so as to obtain the target screenshot.
6. The method of claim 1, wherein the drawing the second picture into the canvas for the target screenshot comprises:
and drawing the second picture into the canvas, and adding a watermark on the canvas to obtain the target screenshot with the watermark.
7. The method of claim 1, wherein the current page is a query result page presented based on a query statement of a user, and before the generating a second view underlying the first view according to target content of the current page, the method comprises:
and screening out the target content relevant to the query statement from all contents of the current page.
8. The method of claim 7, wherein the filtering out the target content related to the query statement from the entire content of the current page comprises:
deleting at least one of a blank content part, an advertisement content part and an operation control from the whole content of the current page to obtain the target content related to the query statement.
9. The method of claim 1, further comprising:
before the picture of the content displayed on the screen of the electronic equipment by the current page is captured, determining that the capture instruction is directed to the whole content of the current page.
10. A screenshot device, the device comprising:
the first intercepting module is used for responding to a received screenshot instruction of a current page of an application program, intercepting a picture of content displayed on a screen of the electronic equipment by the current page, and obtaining a first picture;
the display module is used for displaying the first picture as a first view on the view top layer of the screen;
a generating module, configured to generate a second view located below the first view according to target content of the current page, where the target content includes page content of the current page that is not displayed on the screen;
the second intercepting module is used for creating a canvas according to the size of the second view and intercepting a picture of the second view to obtain a second picture;
and the drawing module is used for drawing the second picture into the canvas to obtain the target screenshot.
11. A non-transitory computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 9.
12. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 9.
CN202111228404.2A 2021-10-21 2021-10-21 Screenshot method, screenshot device, storage medium and electronic equipment Pending CN114047985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111228404.2A CN114047985A (en) 2021-10-21 2021-10-21 Screenshot method, screenshot device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111228404.2A CN114047985A (en) 2021-10-21 2021-10-21 Screenshot method, screenshot device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114047985A true CN114047985A (en) 2022-02-15

Family

ID=80205412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111228404.2A Pending CN114047985A (en) 2021-10-21 2021-10-21 Screenshot method, screenshot device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114047985A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995727A (en) * 2022-05-23 2022-09-02 Oppo广东移动通信有限公司 Method for locally operating drawing content, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502524A (en) * 2016-09-27 2017-03-15 乐视控股(北京)有限公司 Screenshotss method and device
CN107436714A (en) * 2017-09-20 2017-12-05 任文 A kind of method for obtaining mobile phone screen sectional drawing
CN110568973A (en) * 2019-09-09 2019-12-13 网易(杭州)网络有限公司 screenshot method, screenshot device, storage medium and terminal equipment
CN110889072A (en) * 2019-11-21 2020-03-17 深圳前海环融联易信息科技服务有限公司 Screenshot method and device for removing webpage advertisements, computer equipment and storage medium
CN111428162A (en) * 2020-03-20 2020-07-17 支付宝(杭州)信息技术有限公司 Page screenshot method and device
CN112099706A (en) * 2020-09-04 2020-12-18 深圳市欢太科技有限公司 Page display method and device, electronic equipment and computer readable storage medium
CN112306619A (en) * 2020-12-02 2021-02-02 广州橙行智动汽车科技有限公司 Screenshot method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502524A (en) * 2016-09-27 2017-03-15 乐视控股(北京)有限公司 Screenshotss method and device
CN107436714A (en) * 2017-09-20 2017-12-05 任文 A kind of method for obtaining mobile phone screen sectional drawing
CN110568973A (en) * 2019-09-09 2019-12-13 网易(杭州)网络有限公司 screenshot method, screenshot device, storage medium and terminal equipment
CN110889072A (en) * 2019-11-21 2020-03-17 深圳前海环融联易信息科技服务有限公司 Screenshot method and device for removing webpage advertisements, computer equipment and storage medium
CN111428162A (en) * 2020-03-20 2020-07-17 支付宝(杭州)信息技术有限公司 Page screenshot method and device
CN112099706A (en) * 2020-09-04 2020-12-18 深圳市欢太科技有限公司 Page display method and device, electronic equipment and computer readable storage medium
CN112306619A (en) * 2020-12-02 2021-02-02 广州橙行智动汽车科技有限公司 Screenshot method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114995727A (en) * 2022-05-23 2022-09-02 Oppo广东移动通信有限公司 Method for locally operating drawing content, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113473204B (en) Information display method and device, electronic equipment and storage medium
US20230084269A1 (en) Screenshot method, terminal, and non-transitory computer-readable storage medium
US10484639B2 (en) Image generation method and device
CN110704059B (en) Image processing method, device, electronic equipment and storage medium
US10504258B2 (en) Information processing device editing map acquired from server
CN104391626B (en) Method and device for dynamically displaying equipment list
US10013156B2 (en) Information processing apparatus, information processing method, and computer-readable recording medium
US9509733B2 (en) Program, communication apparatus and control method
US20160080298A1 (en) Method for generating emoticon and electronic device supporting the same
CN107045546B (en) Webpage processing method and device and intelligent terminal
CN112930517A (en) Selection interface with synchronized suggestion elements
US10120637B2 (en) Mirror display system having low data traffic and method thereof
CN112748827A (en) Screenshot sharing method and device, terminal equipment and storage medium
CN106998493B (en) Video previewing method and device
CN114047985A (en) Screenshot method, screenshot device, storage medium and electronic equipment
CN109753612B (en) Questionnaire display control method and device, storage medium and electronic equipment
CN108875085B (en) Picture processing method and device for hybrid application, computer equipment and storage medium
CN104932784A (en) Picture display method and terminal
CN112383812A (en) Television-side screen capture sharing method, television side, mobile terminal and system
US10057315B2 (en) Communication support system, information processing apparatus, control method, and storage medium that display an output image obtained by superposing a reference image over a captured image
CN109766530B (en) Method and device for generating chart frame, storage medium and electronic equipment
CN104267873A (en) Folder display method and device
CN112396675A (en) Image processing method, device and storage medium
US10025490B2 (en) Method, device and computer storage medium for multichannel touch control of all-in-one machine
CN111010528A (en) Video call method, mobile terminal and computer readable storage medium

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

Address after: 224008 Rooms 404-405 and 504, Building B-17-1, Big data Industrial Park, Kecheng Street, Yannan High tech Zone, Yancheng, Jiangsu Province

Applicant after: Yancheng Tianyanchawei Technology Co.,Ltd.

Address before: 224008 room 501-503, building b-17-1, Xuehai road big data Industrial Park, Kecheng street, Yannan high tech Zone, Yancheng City, Jiangsu Province (CNK)

Applicant before: Yancheng Jindi Technology Co.,Ltd.

TA01 Transfer of patent application right