CN115268741A - Screen capture method, graphical interface and electronic equipment - Google Patents

Screen capture method, graphical interface and electronic equipment Download PDF

Info

Publication number
CN115268741A
CN115268741A CN202110482108.9A CN202110482108A CN115268741A CN 115268741 A CN115268741 A CN 115268741A CN 202110482108 A CN202110482108 A CN 202110482108A CN 115268741 A CN115268741 A CN 115268741A
Authority
CN
China
Prior art keywords
content
image
electronic device
area
electronic equipment
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
CN202110482108.9A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110482108.9A priority Critical patent/CN115268741A/en
Priority to PCT/CN2022/086168 priority patent/WO2022228101A1/en
Publication of CN115268741A publication Critical patent/CN115268741A/en
Pending legal-status Critical Current

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/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
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/0485Scrolling or panning
    • 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

Landscapes

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

Abstract

The application discloses a screen capture method, which can capture the content displayed on the current screen again when displaying the complete content with dynamic change in a screen after identifying that part of the content with dynamic change exists in a certain area of the content in the process of scrolling the displayed page content of an electronic device. And then, the electronic equipment can cut out the area of the content which can have the dynamic change of the part in the certain area in the previous screenshot and then splice the area with the next screenshot, thereby obtaining a long screenshot with complete, continuous and accurate content.

Description

Screen capture method, graphical interface and electronic equipment
Technical Field
The application relates to the technical field of terminals, in particular to a screen capture method, a graphical interface and electronic equipment.
Background
With the popularization and development of electronic devices, electronic devices have more and more functions. The user can use the screen capture function of the electronic device to capture the content displayed on the screen of the electronic device. Moreover, the existing screen capture function can capture screen capture contents with more than screen length, such as scrolling screen capture.
When the electronic equipment starts the scrolling screen capture function, the content displayed on the screen can be updated in an upward scrolling manner. In the process, the electronic equipment can capture the screen for multiple times and splice multiple screenshots into one long screenshot. However, if there is dynamically changing content, such as a moving picture, a video, etc., during the scrolling screen capturing process, the electronic device cannot find the same portion in the two previous and next screen captures, and thus the two screen captures cannot be spliced, or the splicing is messy.
Therefore, how to avoid the influence of dynamically changing content on scrolling is a problem that needs to be researched currently.
Disclosure of Invention
The screen capture method can identify the content of dynamic change in the user interface, trigger the screen capture to obtain a screenshot when the content of dynamic change is completely displayed, remove the content of dynamic change which is not completely displayed in the previous screenshot, and ensure that the finally obtained long screenshot is complete, accurate and continuous.
In a first aspect, an embodiment of the present application provides a screen capture method, where the method includes: the electronic equipment runs a first application program and displays a first user interface; the electronic equipment receives a first operation; the electronic equipment responds to the first operation and displays first page content provided by the first application program in a scrolling mode in the first user interface; in the process of scrolling and displaying the first page content provided by the first application program in the first user interface, the electronic equipment intercepts the content displayed at different time points to obtain a plurality of images; the plurality of images comprise a first image and a second image, the first image comprises first content of a first area in the first page content, the second image comprises second content of the first area in the first page content, and the first content and the second content are different; the electronic equipment splices the multiple images into a long screenshot, and the long screenshot does not contain the first content and contains the second content.
The screen capture method can be applied to rolling screen capture when dynamically changed content exists in a user interface, and different picture contents are displayed in the two images by the same content in the two images due to the fact that the dynamically changed content exists in the user interface.
With reference to the first aspect, in one implementation, when the electronic device scrolls to display the first page content, the first area moves along with the first page content.
With reference to the first aspect, in one implementation, the electronic device displays first page content provided by the first application program in the first user interface in a scrolling manner along a first direction, where the first direction is directed from a first end to a second end; the first region is: when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the first end in the first page content.
It can be seen that the electronic device can scroll the screenshot in any direction, for example, the electronic device can scroll the screenshot in a bottom-up direction or in a top-down direction.
With reference to the first aspect, in one implementation manner, the first page content includes dynamic content, and the first content includes a part of a first frame in the dynamic content; the second image comprises a second frame in the dynamic content.
That is, the dynamically changing content may refer to dynamic content, the first image containing a portion of the dynamic content, and the second image containing the entire dynamic content. The method can adjust the time of the next screen capture when the electronic equipment identifies the dynamically changed content, and ensure that the second image captured by the electronic equipment contains complete dynamic content.
With reference to the first aspect, in an implementation manner, after the electronic device intercepts the first image, third content appears in the first page content, the first image does not include the third content, the second image includes the third content, and the second content includes a part of the third content.
That is, the dynamically changing content may refer to new content, the first image does not contain the new content, and the second image contains the entire new content. According to the method, when the electronic equipment identifies that the new content appears in the first area, the opportunity of next screen capture is adjusted, and the second image captured by the electronic equipment is ensured to contain complete new content.
With reference to the first aspect, in an implementation manner, the electronic device captures content displayed at different time points to obtain a plurality of images, specifically including: the electronic equipment intercepts the content displayed by the electronic equipment at a first time point to obtain a first image; after the first time point, when the distance of the electronic equipment for scrolling the first page content reaches a first distance, intercepting the content displayed by the electronic equipment to acquire a second image; the second image comprises the complete dynamic content or the complete third content; the first distance is calculated according to the height of the first region, the height of the complete dynamic content or the complete third content, and the height of the first page content displayed in the first user interface.
With reference to the first aspect, in one implementation manner, after obtaining the first image, the electronic device identifies whether dynamic content or third content exists in the first page content in the first area, and when the dynamic content or the third content is identified, the electronic device calculates the first distance according to the dynamic content or the third content.
With reference to the first aspect, in one implementation, the electronic device determines the first distance according to the following formula:
y is less than or equal to the first distance L-X
Wherein, L is a height of the first page content displayed in the first user interface, X is a height of the first area, and Y is the complete dynamic content or the complete third content minus the height of the first area.
With reference to the first aspect, in one implementation, the first user interface includes: a scrollable area and a non-scrollable area, the non-scrollable area displaying second page content provided by the first application; the method for scrolling and displaying the first page content provided by the first application program in the first user interface by the electronic device specifically includes: the electronic equipment scrolls and displays first page content provided by the first application program in the scrollable area; the long screenshot does not include the content of the second area in the first image, and when the electronic device scrolls and displays the content of the first page along the direction from bottom to top, the second area is as follows: when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the lower end in the second page content; when the electronic device scrolls and displays the first page content along the direction from top to bottom, the second area is as follows: when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the upper end in the second page content.
With reference to the first aspect, in an implementation manner, when the electronic device scrolls and displays the first page content in a direction from bottom to top, if the second image is a last image in the multiple images, the screenshot includes content of a third area in the second image, and the third area is: when the electronic equipment intercepts the second image, the electronic equipment displays an area close to the lower end in the second page content; or, when the electronic device displays the first page content by scrolling in a direction from top to bottom, if the first image is a first image of the multiple images, the long screenshot includes content of a fourth region in the first image, and the fourth region is: when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the lower end in the second page content.
With reference to the first aspect, in one implementation, the first user interface includes: a scrollable area and a non-scrollable area, the non-scrollable area having a status bar displayed thereon; the method for scrolling and displaying the first page content provided by the first application program in the first user interface by the electronic device specifically includes: the electronic equipment scrolls and displays first page content provided by the first application program in the scrollable area; if the electronic equipment scrolls to display the first page content along the direction from bottom to top, the long screenshot does not contain the status bar in the second image; if the electronic device scrolls to display the first page content along the direction from top to bottom, the long screenshot does not include the status bar in the first image.
With reference to the first aspect, in an implementation manner, when the electronic device displays the first page content in a scrolling manner in a direction from bottom to top, if the first image is a first image in the multiple images, the long screenshot includes the status bar in the first image; when the electronic equipment scrolls and displays the first page content along the direction from top to bottom, if the second image is the last image in the multiple images, the long screenshot comprises the status bar in the second image.
With reference to the first aspect, in an implementation manner, the electronic device intercepts content displayed at different time points to obtain a plurality of images, and specifically includes: when the electronic equipment receives the first operation, intercepting the content displayed by the electronic equipment to obtain a first image in the plurality of images; or when the electronic equipment stops scrolling and displaying the first page content, intercepting the content displayed by the electronic equipment to obtain the last image in the plurality of images; or the electronic equipment intercepts the content displayed by the electronic equipment in response to the received second operation, and obtains the last image in the plurality of images.
With reference to the first aspect, in an implementation manner, the electronic device splices the multiple screenshots into a long screenshot, which specifically includes: the electronic equipment intercepts the content outside the first area in the first image; the electronic equipment splices the first image and the second image after being cropped, the first area in the second image after being spliced is located at the position of the first image after being cropped, and the first area in the first image before being spliced is located at the position of the first image, and the first area and the second area are the same.
With reference to the first aspect, in an implementation manner, the first page content further includes a fifth area, the first image and the second image both include content of the fifth area, and the fifth area is adjacent to the first area; this electronic equipment splices these many screenshots into long screenshot, specifically includes: the electronic equipment intercepts content in the first image except for a sixth area, wherein the sixth area comprises the first area and the fifth area; the electronic equipment splices the first image and the second image after being cut, the sixth area in the second image after being spliced is located at the position of the first image after being cut, and the sixth area in the first image before being spliced is located at the position of the first image, and the first image and the second image are the same; or the electronic equipment intercepts the content outside the fifth area in the second image, and the electronic equipment intercepts the content outside the first area in the first image; and the electronic equipment splices the second image after being cropped and the first image after being cropped, wherein after being spliced, the fifth area in the first image after being cropped is positioned at the position of the second image after being cropped, and the fifth area in the second image before being spliced is positioned at the position of the second image, which are the same.
In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors, a display screen, one or more memories; wherein the display screen, one or more memories for storing computer program code comprising computer instructions which, when executed by the one or more processors, cause the electronic device to perform the method as described in the first aspect or any one of the embodiments of the first aspect, are coupled to the one or more processors.
In a second aspect, the present application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect or any one of the implementation manners of the first aspect.
In a third aspect, the present application provides a computer program product, which when run on a computer, causes the computer to execute the method as described in the first aspect or any one of the implementation manners of the first aspect.
Drawings
FIG. 1 is a schematic flow chart of a scrolling screen shot;
FIG. 2 is a schematic illustration of a stitching process in a scrolling screen shot;
FIG. 3 is a schematic diagram of another stitching process in a scrolling screenshot;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
FIGS. 6A-6G are a set of schematic diagrams of interfaces provided by embodiments of the present application;
fig. 7 is a schematic diagram of a splicing process in a screen capture method provided in an embodiment of the present application;
fig. 8 is a schematic diagram of another splicing process in the screen capture method provided in the embodiment of the present application;
FIGS. 9A-9B are another set of schematic interfaces provided by embodiments of the present application;
fig. 10 and fig. 11 are flowcharts of methods provided by embodiments of the present application;
FIG. 12 is a schematic diagram illustrating layer separation according to an embodiment of the present disclosure;
FIG. 13 is a diagram illustrating searching for dynamic content according to an embodiment of the present application;
FIG. 14 is a diagram illustrating relationships between parameters provided in an embodiment of the present application;
FIGS. 15, 16, and 17 are schematic diagrams illustrating three position changes of dynamic content in a scrollable area of a first user interface according to an embodiment of the present application;
fig. 18 is a schematic view of a process of splicing an image obtained after cropping by an electronic device according to an embodiment of the present application;
FIG. 19 is a flow chart of a method provided by an embodiment of the present application;
fig. 20 is a schematic diagram of a positional relationship between the first page content and the first area according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and exhaustively described below with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
The term "User Interface (UI)" in the following embodiments of the present application is a medium interface for performing interaction and information exchange between an application program or an operating system and a user, and implements conversion between an internal form of information and a form acceptable to the user. The user interface is source code written by java, extensible markup language (XML) and other specific computer languages, and the interface source code is analyzed and rendered on the electronic device and finally presented as content which can be identified by the user. A common presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc. displayed in a display of the electronic device.
In order to make the picture intercepted by the electronic equipment not only be longer than the screen length, a technical scheme of scrolling the screen is provided.
The scrolling screen shot, that is, the long screen shot, refers to that the electronic device captures contents displayed in the screen for many times in the process of scrolling page contents displayed in the screen. And finally, the electronic equipment splices the multiple screenshots into one long screenshot.
FIG. 1 illustrates a flow diagram of a scrolling screenshot. After the electronic equipment starts the scrolling screen capture function, the electronic equipment firstly captures the content displayed on the current screen, then the page content is scrolled, and when the scrolling distance reaches a certain value, the electronic equipment once again captures the content displayed on the current screen. When the scrolling screenshot is finished, the electronic device may obtain multiple screenshots. According to the sequence of screenshot generation, the electronic equipment can determine the areas with the same content in the two screenshots before and after the area in one screenshot is cut out and then spliced with the other screenshot. And finally, splicing a long screenshot by the electronic equipment by using the plurality of screenshots.
Fig. 2 (a) -2 (C) schematically illustrate a stitching process of the scrolling screenshot in fig. 1.
Fig. 2 (a) and fig. 2 (B) respectively show the first and second captured screenshots after the electronic device starts the scrolling screen capture function. Fig. 2 (C) shows a long screenshot obtained by the electronic device according to the concatenation of the two screenshots. It can be seen that when the region 201 with the same content exists in the two previous screenshots and the two subsequent screenshots, the electronic device can splice a normal long screenshot.
In the process of scrolling a page by the electronic device, the electronic device determines whether the screenshots can be spliced according to the similarity between splicing areas of the two previous screenshots and the two next screenshots, specifically, when the similarity between the splicing areas of the two previous screenshots and the two next screenshots is smaller than a certain threshold, the electronic device determines that the two screenshots have changed contents, such as a video 001 in (a) in fig. 3 or (B) in fig. 3, and in the process of scrolling the page by the electronic device, the picture contents of the video 001 may change, so that when two screenshots generated before and after are not in the same area, the following three situations may occur:
1. and when the electronic equipment identifies that the two screenshots do not have the completely same area, stopping splicing. Thus, the long screenshot taken by the electronic device does not include content in subsequent screenshots.
Fig. 3 (a) and fig. 3 (B) respectively show the first and second captured screenshots after the electronic device starts the scrolling screen capture function.
As shown in fig. 3 (a) -3 (B), the electronic device does not stitch the screenshot shown in fig. 3 (B) to fig. 3 (a) because there are no identical regions in fig. 3 (a) and 3 (B) due to the changed content in the scrolling screenshot. Therefore, the electronic device finally obtains the long screenshot as the image shown in fig. 3 (a).
Therefore, the user cannot intercept the content which the user wants to intercept, and the experience of the user is reduced.
2. And when the electronic equipment identifies that the two screenshots do not have the same area, directly splicing the next screenshot to the bottom end of the previous screenshot.
Referring to fig. 3 (C), the electronic device may directly splice the screenshots shown in fig. 3 (a) and fig. 3 (B), to obtain a long screenshot. The content of the long screenshot is confused.
3. And when the electronic equipment identifies that the two screenshots do not have the same area, cutting the top end part in the next screenshot, and splicing the top end part to the bottom end of the previous screenshot.
Referring to fig. 3 (D), the electronic device splices the screenshot shown in fig. 3 (a) with the image outside the region 301 in the screenshot shown in fig. 3 (B), so as to obtain a long screenshot. The content of the long screenshot is confused.
It can be seen that, in the method for scrolling and capturing a screen shown in fig. 1, when dynamically changing content exists in the process of scrolling and capturing a screen, the electronic device cannot generate a long screenshot with complete, continuous and accurate content.
The embodiment of the application provides a screen capture method, which can capture content displayed in a screen again when displaying complete changed content in the screen if the changed content is identified to exist in a certain area of the content after capturing the content displayed in the screen in the process of scrolling and displaying page content by an electronic device. And then, the electronic equipment can cut the content of the area in the previous screenshot and then splice the content with the next screenshot. Therefore, the long screenshots obtained by the electronic equipment do not contain the content of the area in the previous screenshot but contain the content of the area in the next screenshot, so that the condition that the splicing of the changed content is disordered when the two screenshots containing the changed content are spliced by the electronic equipment is avoided.
The page content displayed by the electronic device in a scrolling manner may refer to the page content displayed on the screen moving from the bottom end of the screen to the top end of the screen. After the scrolling display, the content close to the top end of the screen in the original page content disappears, and the part close to the bottom end of the screen in the original page content is updated, so that the effect of updating the page content in the screen is achieved. For example, as shown in fig. 3 (a) and fig. 3 (B), the electronic device scrolls the displayed page content, and the change process of the content before and after the display in the user interface is performed. In the user interface shown in fig. 3 (a), the content of the page content near the top of the screen disappears in fig. 3 (B), and in the user interface shown in fig. 3 (B), the content that does not exist in fig. 3 (a) appears in the page content near the bottom of the screen.
The electronic equipment captures the content displayed in the screen means that the electronic equipment acquires all the content displayed on the current screen to obtain the corresponding screenshot. The screenshot can be stored in RAM of the electronic device. After the electronic device generates the long screenshot, a plurality of screenshots obtained in the scrolling screenshot process can be deleted.
The page content refers to content provided by an application program currently running in the foreground of the electronic device. The page content is distinguished from content provided by a system application of the electronic device, such as a status bar, a navigation bar. The page content may include: scrollable content, and, non-scrollable content.
Non-scrollable content refers to content that is fixedly displayed in the screen and whose display position cannot be altered in response to a user-input up-down swipe gesture. Such as menu bars, return controls, title bars, etc.
Scrollable content refers to content that may alter a display position in response to a user-input up-and-down swipe gesture. Such as information bars, pictures, videos, and so forth.
The changed content belongs to scrollable content, and the changed content may include the following two types:
1. dynamic content, which itself dynamically changes, may include, but is not limited to, one or more of the following: dynamically changing videos, pictures, icons, controls, text, or tables. The dynamic change of the content can be in various forms, and for example, the dynamic change of the content can comprise the change of a video picture, the change of picture content, the change of color, the change of size, the change of angle, the change of position and the like.
2. New content that suddenly appears in a certain area of the page content. Such as pop-up advertisements, pop-up icons, prompt boxes, etc. For a detailed explanation of the new content, reference may be made to the following description of the UI embodiment, which is not repeated here.
By implementing the screen capture method provided by the embodiment of the application, the long screenshots spliced by the electronic equipment contain complete dynamic content or new content, and the content in the long screenshots is complete, continuous and accurate, so that the experience of a user can be improved.
Fig. 4 shows a schematic structural diagram of the electronic device 100.
The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, and the specific type of the electronic device is not particularly limited by the embodiments of the present application.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In this embodiment, in the process of scrolling the displayed page content, if it is identified that a part of changed content exists in a certain area of the content after the content displayed in the screen is captured, the processor 110 can capture the content currently displayed on the screen again when displaying the whole changed content in the screen. Moreover, the processor 110 may cut out an area of the previous screenshot where the changed content appears in the certain area, and then splice the cut-out area with the next screenshot. For the identification of the changed content, the screen capture opportunity when the completely changed content is displayed, and the splicing process of the screen captures, reference may be made to the detailed description of the subsequent method embodiment, which is not repeated here.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
In some embodiments, during the operation of the application program by the electronic device 100, the electronic device 100 may load data required for the page content of the application program through the mobile communication module 150, so that when the electronic device 100 detects a user's up-and-down sliding operation, the electronic device 100 can scroll and update the page content in response to the operation.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, during the electronic device 100 running the application program, the electronic device 100 may load data required in the page content of the application program through the wireless communication module 160, so that when the electronic device 100 detects a user's up-and-down sliding operation, the electronic device 100 can scroll and update the page content in response to the operation.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
In some embodiments, display screen 194 may be used to display a user interface involved in the running of an application by electronic device 100. See in particular the user interface provided in the subsequent embodiments. In the following embodiments of the present application, the display screen 194 may also be referred to as a screen.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
In some embodiments, internal memory 121 may be used to store screenshots obtained when electronic device 100 intercepts content displayed in a screen. The long screenshot spliced by the electronic device 100 or the long screenshot edited by the user may also be saved.
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like; the nonvolatile memory may include a magnetic disk storage device, a flash memory (flash memory).
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but have different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided via the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The electronic device 100 can be mounted
Figure BDA0003048848130000091
iOS, android, microsoft, or other operating systems. The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Fig. 5 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 5, the application package may include applications such as a scrolling screen application, a camera, a gallery, a calendar, a call, a map, WLAN, bluetooth, music, video, short message, etc.
The scrolling screenshot application is an application program applicable to an electronic device such as a mobile phone and a tablet computer, and the application program can intercept content displayed on a current screen again when displaying complete changed content in a screen if it is recognized that part of the changed content exists in a certain area of the content after intercepting the content displayed in the screen in a process of scrolling the displayed page content by the electronic device 100. Then, the electronic device 100 may cut out an area of the previous screenshot in which the content of the partial change appears in the certain area, and splice the cut-out area with the subsequent screenshot.
Moreover, the scrolling screenshot may call some general interface function (e.g., a system screenshot interface) to capture the content displayed by the electronic device 100, and obtain a screenshot with the same screen content as the content displayed on the screen.
It is understood that in other embodiments of the present application, the scrolling screenshot may be replaced by another name. Such as long screenshots, sliding screenshots, tiled screenshots, etc., which are not limited by this application.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 5, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar or a navigation bar exists, lock the screen, intercept the content displayed in the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions for the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a brief dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide a fusion of the 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
A set of interface diagrams implemented on electronic device 100 is illustratively described below in conjunction with fig. 6A-6G.
In the user interfaces shown in fig. 6A to 6G, the electronic device 100 is described as running a social application, such as a "microblog" application.
The social application is social media software suitable for electronic equipment such as mobile phones and tablet computers, and the software can realize functions such as instant sharing, transmission and interaction of information in multimedia forms such as characters, pictures and videos. Specifically, the social application may be an application program such as a microblog or a WeChat.
When the electronic device 100 runs the application, the electronic device 100 may detect an interface operation of sliding up and down by the user, and in response to the interface operation, the electronic device 100 moves and updates content displayed on a page of the application, where the content displayed on the page may include: video, text, picture, icon, and the like.
Fig. 6A illustrates an exemplary user interface 210 for an application menu on electronic device 100.
As shown in fig. 6A, the user interface 210 may include: a status bar 211, a tray with frequently used application tables 215, a calendar indicator 212, a weather indicator 213, a navigation bar 216, and other application icons 214. Wherein:
the status bar 211 may include one or more signal strength indicators for mobile communication signals, one or more signal strength indicators for wireless fidelity (WiFi) signals, a battery status indicator, and a time indicator. Calendar indicator 212 may be used to indicate the current time. Weather indicator 213 may be used to indicate the weather type.
The tray 215 with the common application icons may show: a dial icon 215A, an information icon 215B, a contacts icon 215C, and a camera icon 215D.
Navigation bar 216 may include: a return button 216C, a Home screen button 216B, a call task history button 216C, and other system navigation keys.
Other application icons 214 may include a mail icon 214A, a gallery icon 214B, a music icon 214C, and a microblog icon 214D. The microblog icon 214D may be used to launch a "microblog" application. The other application icons 214 may also include more application icons, which are not limited in this embodiment.
The user interface 210 may also include a page indicator 217. Other application icons may be distributed across multiple pages and page indicator 217 may be used to indicate which page the user is currently browsing for applications in. The user may slide the area of the other application icons from side to browse the application icons in the other pages. Upon detecting that the user clicked on these application icons, electronic device 100 may display the user interface of the application.
In some embodiments, the user interface 210 illustratively shown in FIG. 6A may be a Home screen (Home Screen).
Referring to fig. 6A, the electronic device 100 may detect a user operation (e.g., a click operation on the microblog icon 214D) on the microblog icon 214D, launch a "microblog" application corresponding to the icon 214D in response to the user operation, and display a user interface 310 exemplarily shown in fig. 6B.
As shown in FIG. 6B, the user interface 310 may be a default home interface for a "micro-blogging" application, including: a first menu bar 311, an information bar 312, and a second menu bar 313. Wherein:
the first menu bar 311 may be used to turn on the camera function, switch to a different information browsing page, and the first menu bar 311 does not change position following up and down movement of the page content.
The information bar 312 may be used to display microblog information published by the user. Where the information banner 312 includes a video control 314. The video control 314 may expose dynamically changing video content.
The second menu bar 313 includes a home option 313A, a discovery option 313B, a message option 313C, and a local option 313D. The home page option 313A is used for displaying home page microblog information, the discovery option 313B is used for searching microblog information, the message option 313C is used for displaying messages received by a user, and the local option 313D is used for managing account information.
Moreover, the electronic device 100 can detect a user operation (e.g., a touch operation of sliding up and down) applied to the user interface 310, and in response to the user operation, the electronic device 100 can scroll the content of the page displayed in the information bar 312 of the user interface 310 to load and display more microblog information. Wherein the video control 314 will move along with the scrolling of the page upwards and the video in the video control 314 may be in a playing state. The status bar 211, the first menu bar 311, and the second menu bar 313 do not move along with the touch operation of the user on the user interface 310 sliding up and down.
That is, the region in which the information bar 312 is located is a scrollable region. The content within the region may change position following a user gesture of sliding up and down. The region formed by the status bar 211, the first menu bar 311, and the second menu bar 313 is a non-scrollable region. The content in the area does not change position following the user's gesture of sliding up and down.
As shown in fig. 6B, when the electronic apparatus 100 detects a scroll screen capture operation applied to the user interface 310 by the user, for example, the operation may refer to the user drawing "S" on the screen with a finger joint, in response to the operation, the electronic apparatus 100 displays the user interface 310 as shown in fig. 6C.
As shown in fig. 6C, the electronic device 100 starts the scrolling screenshot function, captures the content displayed on the current screen, obtains a first screenshot, and displays a first prompt box 321 at the top of the user interface 310, where the first prompt box 321 is content provided by the scrolling screenshot application when the electronic device 100 starts the scrolling screenshot function, and the content is used to prompt the user that the scrolling screenshot function is started, and clicking the screen may end the scrolling screenshot.
In some embodiments, the electronic device 100 may also turn on the scrolling screen capture function in other ways, for example, the electronic device 100 may detect an operation of a user acting on a three-directional downward slide of the screen, in response to which the electronic device 100 displays the thumbnail icon of the scrolling screen capture, and when the electronic device 100 detects a touch operation of the user acting on the thumbnail icon of the scrolling screen capture, the electronic device 100 turns on the scrolling screen capture function. Alternatively, the electronic apparatus 100 may further have an icon for turning on the scroll screen capture function. Alternatively, the electronic apparatus 100 may start the scroll screen capture function in response to a click operation of a key by the user.
In addition, the electronic device 100 identifies that only a part of the displayed video control 314 exists in the page content in the user interface shown in fig. 6C, and calculates a distance that the page content needs to be scrolled before the next screen capture, so that the user interface can display the complete video control 314 when the next screen capture is performed.
In some embodiments, after the electronic device 100 turns on the scrolling screen capture function, there are two ways to scroll the page content:
1. the electronic device 100 actively scrolls the page content. In this way, the content of the page displayed by the electronic device 100 can be automatically scrolled without the operation of the user, and a convenient scrolling screen capturing operation is provided for the user.
2. The electronic apparatus 100 receives an operation of the user to slide up and down, and in response to the operation, the electronic apparatus 100 scrolls the page content. Therefore, the user can browse the page content in detail according to the requirement of the user in the process of scrolling and screen capturing.
In the following embodiments of the present application, mode 1 is taken as a mode for the electronic device 100 to scroll page contents.
In some embodiments, the electronic device 100 may have any scrolling direction, e.g., up, down, etc., after the scrolling screenshot function is turned on. The upward scrolling refers to the page content displayed in the screen moving from the bottom end of the screen to the top end. Similarly, the downward scrolling refers to the movement of the page content displayed on the screen from the top of the screen to the bottom of the screen.
In the UI embodiment of FIGS. 6A-6G, the electronic device 100 scrolls the page content in an upward scrolling direction.
As shown in fig. 6D, after the scrolling screen capture function is turned on, the electronic device 100 starts to scroll up the page content displayed on the user interface 310. Also, as the electronic device 100 scrolls through the page content, the content displayed by the control changes relative to the video control 314 shown in FIG. 6C. If the page scrolls a distance that is up to the distance calculated by the electronic device 100, the user interface 310 presents the complete video control 314. At this time, the electronic device 100 calls the system screenshot interface to capture the content displayed on the current screen, and obtains a second screenshot.
As shown in fig. 6E, in the process of scrolling the content of the page displayed by the user interface 310, the electronic device 100 may detect that the user operation (e.g., a click operation) of scrolling the screen shot is finished, in response to which the electronic device 100 screens the content currently displayed on the screen to obtain the last screen shot, and the electronic device 100 displays the user interface 310 as shown in fig. 6F.
As shown in fig. 6F, the electronic device 100 stops scrolling the page content and updates the first prompt box 321 to the second prompt box 331, the second prompt box 331 is used to prompt the user that the scrolling screen capturing is finished, and then displays the user interface 410 as shown in fig. 6G.
In some embodiments, the electronic device 100 may end the scrolling screenshot according to the scrolling condition of the page. For example, the electronic device 100 may automatically end the scrolling screenshot when the page has scrolled to the bottom, or when the current page is still in a state of loading data.
In some embodiments, the electronic device 100 may end the scrolling screen shot based on the efficiency of the background run or the configuration of the resource. For example, the electronic device 100 may set a maximum value for the total scrolling distance of the page content or the number of screen shots according to the efficiency of the background operation or the configuration of the resources. In the scroll screenshot, when a total scroll distance of the page contents or the number of times of the screenshots reaches a maximum value, the electronic apparatus 100 ends the scroll screenshot.
As shown in fig. 6G, the user interface 410 is a screenshot presentation interface, which includes: a return control 411, a delete control 412, a save control 413, a long-shot thumbnail 414, and an operation control 415.
Where the return control 411 is used to exit the user interface 410 and return to the user interface 310 prior to scrolling the screenshot. The delete control 412 is used to delete the long screenshot captured by the scrolling screenshot. The save control 413 is used for saving the long screenshot intercepted by the current scroll screenshot. The long screenshot thumbnail 414 is used to preview the long screenshot captured by the scrolling screenshot. The operation control 415 includes: the sharing control 415A is used for sharing the long screenshot captured by the current scrolling screen capture into other application programs, the doodle control 415B is used for adding characters, pictures or other contents to the long screenshot captured by the current scrolling screen capture, and the eraser control 415C is used for erasing the characters, pictures or other contents added to the long screenshot captured by the current scrolling screen capture.
In some embodiments, the screenshot presentation interface may not be displayed after the electronic device 100 finishes scrolling the screenshot. The electronic device 100 may directly save the obtained long screenshot to the gallery. Or, after the electronic device 100 finishes scrolling the screenshot, the screenshot thumbnail is displayed in the user interface 310, and when the electronic device 100 detects a user operation (e.g., a click operation) performed on the screenshot thumbnail by the user, the electronic device 100 may display a screenshot display interface, enter an editing interface of the long screenshot, and further process the long screenshot obtained by the electronic device 100.
As can be seen from fig. 6B to 6E, during the scrolling screen shot, the video content displayed in the video control 314 changes, but fig. 6G shows a complete and accurate long shot screen shot, and the content in the area where the video control 314 is located in the long shot is not in a cluttered state.
Fig. 7 schematically illustrates a splicing process in the screen capture method provided by the embodiment of the application.
Fig. 7 (a) -7 (D) correspondingly illustrate the relationship between the images displayed by the user interface in fig. 6A-6G and the images captured and stitched inside the electronic device 100.
Fig. 7 (a) shows a first screenshot taken after electronic device 100 turns on the scrolling screenshot.
Fig. 7 (B) shows a second screenshot taken after the electronic apparatus 100 detects the video.
Fig. 7 (C) shows the last screenshot taken by the electronic apparatus 100 after detecting that the user has finished scrolling the screenshot.
Fig. 7 (D) shows the long shots stitched by the electronic device 100 according to the shots in fig. 7 (a), fig. 7 (B), and fig. 7 (C), which correspond to the shots displayed by the long shot thumbnail 414 in fig. 6G.
The electronic device 100 cuts out the content of the area 403 in the first screenshot shown in fig. 7 (a), splices the first screenshot with the second screenshot according to the area 402, and splices the second screenshot with the last screenshot according to the area 405. In addition, neither the area 402 nor the area 405 includes dynamic content, so that the process of splicing screenshots by the electronic device 100 is not affected no matter whether the dynamic content intercepted by the screenshot is changed or not.
In some embodiments, the speed of change of the content displayed in the video control 314 may be slower than the speed of scrolling of the electronic device 100 during scrolling of the page content by the electronic device 100. Then, although the content in the video control 314 is dynamically changed, the content displayed by the video control 314 in the first screenshot and the second screenshot captured by the electronic device 100 is the same.
Fig. 8 schematically illustrates another splicing process in the screen capture method provided by the embodiment of the application.
Fig. 8 (a) shows a first screenshot taken after electronic device 100 turns on the scrolling screenshot. Fig. 8 (B) shows a second screenshot taken after electronic apparatus 100 detects a video, i.e., video 002. Although video 002 is the changed content, the screen content in video 002 in two adjacent screenshots may not change during the page scrolling process.
Fig. 8 (C) shows the last screenshot taken by the electronic apparatus 100 after detecting that the user has finished scrolling the screenshot.
Fig. 8 (D) shows long screenshots spliced by electronic device 100 according to the screenshots in fig. 8 (a), fig. 8 (B), and fig. 8 (C).
That is to say, the screenshot method provided by the embodiment of the application can adjust the region of screenshot splicing, so that the changed content does not appear in the region. In this way, no matter whether the screen in the changed content is changed or not, the process of scrolling the screen shot is not affected by the content, and the problem of screen confusion does not occur in the long screen shots spliced and obtained by the electronic device 100.
In some application scenarios, the changed content may refer to new content that suddenly appears in a certain area.
Illustratively, as shown in fig. 9A, in the process of scrolling the screen shot, the electronic device 100 captures the content currently displayed on the screen, where the page content displayed in the user interface 310 has an area B, which is located at the bottom of the scrollable content and is an area in the page content, which moves along with the movement of the page content. The electronic device 100 continues to scroll up the page content as shown in FIG. 9B, at which point the user interface 310 may be the user interface that appears after FIG. 9A. As the page scrolls up, a treasure box icon 316 appears in the page and a portion of the icon appears in area B. It can be seen that the icon is different from the content that gradually appears as the page scrolls upward, the icon is within an area that has existed in the page at the time of the previous screen capture, the content that appears in the area at the time of the next screen capture, and the icon can move upward together with the page scrolling upward.
In some embodiments, the electronic device 100 may recognize the new content suddenly appearing during the scrolling of the screen shot, and calculate a distance that the page needs to be scrolled during the next screen shot of the electronic device 100, so that the screen shot contains the new content completely. Moreover, the electronic device 100 may calculate the position of the new content in the page, and calculate an area that needs to be cropped in the image captured last time, so that the area spliced by the electronic device 100 can avoid the area where the new content appears. In this way, the long shot that is finally output by electronic device 100 can contain the new content in its entirety.
A flowchart of a method related to an embodiment of the present application is exemplarily described below with reference to fig. 10.
Stage 1: opening rolling screen shot
S101, the electronic device 100 runs a first application program and displays a first user interface.
The first user interface includes page content and system content.
The system content refers to content provided by the system application when the electronic device 100 runs the system application, and includes a status bar, a navigation bar, and the like.
The page content refers to content provided by a first application currently running in the foreground by the electronic device 100. When the electronic device 100 starts the first application, the electronic device 100 may load out page content provided by the first application through the network. Moreover, only part of the page content is displayed in the first user interface, and when the electronic device 100 receives an operation of the user on sliding the screen up and down, the other part of the page content may be displayed in the first user interface.
When the electronic device 100 runs the first application, the area in which the first user interface is located may be divided into two parts: a scrollable area and a non-scrollable area.
The scrollable area refers to an area in the user interface where the content of the display position can be changed in response to an operation by the user (e.g., a gesture of sliding up and down). Such as the area where information bars, pictures, message lists, etc. are located. In contrast, a non-scrollable area refers to an area in the user interface where the content of the display position cannot be changed in response to an operation by the user (e.g., a gesture of sliding up and down), being fixed in the screen. Such as the region in which the menu bar, return control, title bar, etc. are located.
The page content provided by the first application may be divided into scrollable content and non-scrollable content. The scrollable content is the content displayed in the scrollable area content in the user interface, and the non-scrollable content is the content displayed in the non-scrollable area content in the user interface. Also, only a portion of the scrollable content may be displayed in the scrollable area.
In an embodiment of the present application, the scrollable content may refer to a first page content, and the non-scrollable content may refer to a second page content.
Referring to FIG. 6B, the first application may be referred to as a "microblog" application and the first user interface may be referred to as a user interface 310. The system content may refer to the status bar 211. The scrollable area may be an area where the information bar 312 is located, and the non-scrollable area may be an area where the first menu bar 311 and the second menu bar 313 are located.
It is understood that fig. 6B is only an example, and the first user interface, page content, may have other implementations, which are not limited in this application.
S102, the electronic device 100 starts a scrolling screen capture function.
In some embodiments, the electronic apparatus 100 may detect a user operation of the user to turn on the scroll screen capture function, and in response to the operation, the electronic apparatus 100 turns on the scroll screen capture function. Illustratively, referring to fig. 6B, the user operation may be an interface operation in which the user draws "S" on the screen with a finger joint. Or, the electronic device 100 detects a user operation performed by the user on the three-point downward sliding of the screen, in response to the operation, the electronic device 100 displays the thumbnail icon of the scroll screenshot, and when the electronic device 100 detects a touch operation performed by the user on the thumbnail icon of the scroll screenshot, the electronic device 100 starts the scroll screenshot function. The embodiment of the application does not limit the user operation.
In the embodiment of the present application, the user operation of turning on the scrolling screenshot function by the user may be referred to as a first operation.
In other embodiments, an icon for turning on the scrolling screenshot function may be present in the user interface of the electronic device 100. The user interface may be a main interface of the electronic device 100, or may be a pull-down menu interface displayed after a touch operation in which the user operates a screen to slide down is performed. When the electronic apparatus 100 detects a user operation (e.g., a click operation) by the user on the icon, the electronic apparatus 100 may turn on the scroll screen capture function in response to the operation.
In other embodiments, the electronic apparatus 100 may respond to a click operation of a key by the user, in response to which the electronic apparatus 100 starts the scroll screen capture function. For example, the operation may be a click operation that acts on the volume key and the lock screen key at the same time.
It is understood that, the three ways of turning on the scrolling screenshot function are not limited, and other ways of turning on the scrolling screenshot function may exist in other embodiments of the present application.
And (2) stage: electronic equipment scrolls page content, captures screen for multiple times and obtains multiple images
S103, the electronic device 100 scrolls the content of the scrollable area in the first user interface until the scrolling screen capture is finished.
In some embodiments, after the electronic device 100 starts the scrolling screenshot function, there are two ways to scroll the page content:
1. the electronic device 100 actively scrolls the page content.
That is, after the electronic device 100 turns on the scroll screen capture function, the content of the page displayed by the electronic device 100 may be automatically scrolled. In this way, the content of the page displayed by the electronic device 100 can be automatically scrolled without the operation of the user, and a convenient scrolling screen capturing operation is provided for the user.
2. The electronic apparatus 100 receives a sliding operation by the user, and in response to the operation, the electronic apparatus 100 scrolls the page content.
Specifically, when the electronic apparatus 100 receives a user's slide-up operation on the first user interface, in response to the operation, the electronic apparatus 100 scrolls the page content upward; when the electronic apparatus 100 receives a user's flick operation on the first user interface, the electronic apparatus 100 scrolls the page content downward in response to the operation.
That is, after the scroll screen capture function is turned on, the electronic device may scroll page content according to the user's operation. Therefore, the user can browse the page content in detail according to the requirement of the user in the process of scrolling and screen capturing.
It is understood that in other embodiments of the present application, the electronic device 100 may have other ways of scrolling the content of the page, and the present application is not limited thereto.
In some embodiments, after the electronic device 100 turns on the scrolling screen capture function, there may be any scrolling direction, for example, the direction may be up, down, etc. The upward scrolling refers to the movement of the page content displayed in the screen from the bottom to the top of the screen. Similarly, the downward scrolling refers to the movement of the page content displayed on the screen from the top of the screen to the bottom of the screen.
In some embodiments, electronic device 100 may control the speed at which page content scrolls. For example, the electronic device 100 may scroll the page content at a constant speed, accelerate the scrolling of the page content, or determine the scrolling speed according to the scrolling distance between two screen shots, where the scrolling speed may be increased when the distance between the next screen shot and the previous screen shot is greater, and the scrolling speed may be decreased when the distance between the next screen shot and the previous screen shot is smaller.
S104, in the process of scrolling the content of the scrollable area in the first user interface, the electronic device 100 intercepts the content displayed by the first user interface at different time points to obtain a plurality of images; the plurality of images includes a first image and a second image obtained at adjacent time points.
In some embodiments, after the intercepted content displayed by the first user interface includes partial dynamic content, if the first user interface displays complete dynamic content in a later scrolling process, the electronic device 100 intercepts the content displayed by the current first user interface again, where an image obtained last time by the electronic device is a first image and an image obtained last time by the electronic device is a second image.
Specifically, when the electronic device 100 intercepts content displayed by the first user interface at a certain time point, it may check whether a first area in page content currently displayed by the first user interface contains dynamic content, and if so, the electronic device displays the complete dynamic content in the first user interface in a subsequent process of scrolling the page content in the scrolling direction. When the first user interface displays the complete dynamic content, the electronic device may again intercept the content currently displayed by the first user interface.
Wherein the scrolling direction may be a direction in which the first end points to the second end. Specifically, when the rolling direction is from top to bottom, the first end is the lower end, and the second end is the upper end, and when the rolling direction is from top to bottom, the first end is the upper end, and the second end is the lower end.
The first area is a certain area in the page content, and the first area can synchronously change the position in the screen along with the scrolling of the page content. The first region specifically includes: when the electronic equipment intercepts the first image, the electronic equipment displays a region at the first end of the scrollable region in the page content.
Specifically, the electronic device 100 may determine the range of the first region from a portion of the dynamic content in the first image. The width of the first region may be a width of the scrollable area and the height of the first region may be a height of the portion of the dynamic content in the first image.
Referring to fig. 6C and 6D, the electronic apparatus 100 may intercept the content displayed by the first user interface again when the content shown in fig. 6D is displayed during scrolling after the content displayed by the first user interface shown in fig. 6C is intercepted. The first region is the region in fig. 6C where the partial video control 314 is located. In this case, the image captured in the previous time by the electronic apparatus 100 is a first image, and the image captured in the next time is a second image.
In other embodiments, after the electronic device 100 intercepts the content displayed by the first user interface, if the first user interface suddenly displays or new content appears during a later scrolling process, the electronic device 100 intercepts the content displayed by the current first user interface again, where an image obtained by the electronic device 100 last time is a first image and an image obtained by the electronic device 100 last time is a second image.
Specifically, after the electronic device 100 intercepts the content displayed by the first user interface at a certain time point, in the process of scrolling the page content in the subsequent scrolling direction, if a part of new content is displayed in the first area of the page content displayed by the first user interface, the electronic device 100 intercepts the content displayed by the current first user interface again when the first user interface displays the complete new content.
The electronic device 100 may determine the extent of the first area when new content appears in the page content. When the electronic device 100 obtains the first image, one end of the first area is located in the page content near a boundary position of the first end of the scrollable area, and when new content appears in the page content, the other end of the first area is located in the page content near a boundary position of the second end of the new content. The height of the first area can be determined according to the positions of the two ends of the first area. The width of the first region may be the width of the scrollable area.
Referring to fig. 9A and 9B, the electronic apparatus 100 may intercept the content displayed by the first user interface again when the content shown in fig. 9B is displayed during the scrolling after the content displayed by the first user interface shown in fig. 9A is intercepted. The first region is a region B shown in fig. 9A or 9B. In this case, the image captured in the previous time by the electronic apparatus 100 is the first image, and the image captured in the next time is the second image.
It is understood that the electronic device 100 may determine the position of the first area at each image time, where the position is a position near the first end of the scrollable area, and the electronic device 100 may determine the range of the first area according to the dynamic content or the new content when recognizing that the dynamic content or the new content exists in the first area.
In some embodiments, the height of the first region may also be a fixed value. For example, the height of the scrollable area may be 50% or may be a value determined by the electronic device 100 according to a preset threshold, for example, the height is 40% of the height of the scrollable area when the preset threshold is 60% of the height of the scrollable area.
The detailed process of step S104 is described below with reference to fig. 11.
S1041, when the electronic device 100 starts to scroll the content of the scrollable area in the first user interface, intercepting the content displayed in the first user interface for the first time to obtain a corresponding image.
The content intercepted by the electronic device 100 is content provided by a first application program and a system application running in the foreground of the electronic device 100, and the content does not include content provided by the scrolling screenshot application (for example, the first prompt box 321 in fig. 6C).
In the following steps S1042-S1044, the electronic device 100 determines, through S1042, a next step to be executed (S1043 or S1044), and then, the electronic device 100 may return to execute S1042 after executing S1043; similarly, the electronic device 100 may return to performing S1042 after performing S1044. In this way, the electronic device 100 may repeat operations of scrolling page content and screen capture to obtain a plurality of images.
S1042, the electronic device 100 determines whether the first area includes a part of the dynamic content or a part of the new content.
The electronic device 100 determines whether the first area contains part of the dynamic content or part of the new content, and the following two situations may exist:
1. when the electronic device 100 intercepts the content displayed in the first user interface, it is determined whether a part of the dynamic content is included in the first area.
When the electronic device 100 intercepts content displayed by the first user interface, there is partial dynamic content in the content. For example, the dynamic content may refer to the video control 314 in FIG. 6B.
That is, the electronic apparatus 100 may determine whether a portion of the dynamic content is included in the first area when the electronic apparatus 100 intercepts the content displayed by the first user interface.
2. The electronic device 100 determines whether a portion of new content is included in the first region during scrolling of content in the scrollable area of the first user interface.
The new content does not appear when the electronic device 100 intercepts the content displayed in the first user interface, but suddenly appears in the first user interface during the process of the electronic device 100 scrolling the content of the scrollable area. For example, the new content may refer to the treasure box icon 316 in FIG. 9A.
That is, the electronic device 100 may determine whether a part of new content appears in the first area while continuing to scroll the content of the scrollable area after intercepting the content displayed in the first user interface.
If the electronic device 100 determines that the first area includes a part of the dynamic content or a part of the new content, step S1043 is performed; otherwise, the process proceeds to step S1044.
S1043, when the scrollable area contains complete dynamic content or new content, the electronic device 100 intercepts the content displayed in the current first user interface again to obtain a corresponding image.
In some embodiments, the electronic device 100 may determine the length of the scrollable area of content that needs to be scrolled. That is, the electronic apparatus 100 may determine the timing of the next screen capture according to the distance. After the electronic device 100 intercepts the content displayed in the first user interface for the previous time, when the scrolling distance of the content in the scrollable area reaches the length, the electronic device 100 intercepts the content displayed in the current first user interface again, so that the dynamic content or the new content is completely displayed in the corresponding image obtained by the electronic device 100.
Specifically, the electronic device 100 may determine the first distance according to a part of the dynamic content or a part of the new content in the first area. The first distance is a distance that the contents of the scrollable area are scrolled in the scrolling direction when the electronic device 100 performs the screen capture again from the previous screen capture.
The electronic device 100 calculates the first distance according to the dynamic content or the new content, and may perform the following steps:
step 1, the electronic device 100 identifies layer information in the first user interface.
The layer information refers to the up-down position relation of the UI elements contained in the first user interface in the user interface. UI elements refer to visual elements on the first user interface, including: icons, text, video, controls, pictures, etc.
The electronic device 100 may obtain the layer information in the first user interface to accurately position the UI elements on the user interface, and determine which layer the different UI elements are located on.
In some embodiments, before the electronic device 100 identifies the layer information in the first user interface, obtaining a name of a first application program run by the electronic device 100 is further included.
And 2, the electronic device 100 determines a main layer according to the layer information.
In some embodiments, the electronic device 100 performs layer separation on UI elements on the first user interface according to the layer information to find a main layer. The main layer refers to a layer where content provided by a first application program currently running on the electronic device 100 is located.
As shown in fig. 12, an image 1 is content displayed on the screen of the electronic apparatus 100. The electronic device 100 may separate the image 1 into three layers according to the obtained layer information, where the layer 1 is a layer where content provided by the system application is located, the layer includes a status bar, the layer 2 is a main layer, the layer is a layer where content provided by the first application is located, the layer includes a UI element displayed when the electronic device 100 runs a "micro blog" application, the layer 3 is a layer where content provided by the scrolling screenshot application is located, and the layer includes a prompt box of the scrolling screenshot.
Step 3, the electronic device 100 determines the height of the scrollable area.
The electronic device 100 may determine which UI elements in the first user interface are scrollable based on the information of the UI elements and then determine a height of a scrollable area in the first user interface based on the scrollable UI elements.
Wherein, the information of the UI element may include: name, location, size, type, etc. The electronic device 100 may determine a position of the UI element on the first user interface according to the position information of the UI element, the electronic device 100 may determine a size of the UI element according to the size information of the UI element, and the electronic device 100 may determine a type of the UI element, such as a picture, a video, an icon, text, and the like, according to the type information of the UI element. That is, the electronic apparatus 100 may determine whether the UI element is dynamic content according to the type information of the UI element, for example, when the type of the UI element is video, the UI element is dynamic content.
Electronic device 100 may determine whether a UI element is scrollable according to two ways:
1. the electronic device 100 may determine whether the name of the UI element contains a specific field, such as "webview", "scrollview", "listview", "recycleview", "contentview", and the like.
2. Electronic device 100 can create and update a list of scrolling UI elements corresponding to different user interfaces. The list of scrolling UI elements records UI elements that can be scrolled in the user interface. When the electronic device 100 acquires information of the UI elements in the main layer, the scrollable UI elements in the user interface may be acquired by querying the list.
The manners in which the electronic device 100 determines whether the UI element is scrollable include, but are not limited to, the above two manners, which are not limited in this application.
Illustratively, referring to FIG. 6B, the scrollable area may refer to the area where the information bar 312 is located.
Step 4, the electronic device 100 determines the height of the part of the dynamic content or the part of the new content in the first area.
In some embodiments, the electronic device 100 may traverse all UI elements of the main layer, each UI element may correspond to one node, or one node includes multiple UI elements, and the electronic device 100 may find out dynamic content or new content included in the layer according to information of the UI elements included in each node. Thereby determining the height of the portion of the dynamic content or the portion of the new content located within the first area.
Fig. 13 is a diagram illustrating the electronic device 100 searching for dynamic content. Wherein the electronic device 100 can find the dynamic content in the first user interface through the node 3.
That is, the electronic device 100 may roughly determine the position of the first area, and when the electronic device 100 finds the dynamic content or the new content according to the layer information, if the first area includes a part of the dynamic content or the new content, the electronic device determines the height of the first area according to the dynamic content or the new content.
Step 5, the electronic device 100 determines the first distance.
The electronic device 100 may determine the first distance according to the following equation:
y is less than or equal to the first distance L-X
L refers to the height of the scrollable area, X refers to the height of the first area, and Y refers to the height of the first area subtracted from the full dynamic content or the full new content.
Taking the content displayed in the scrollable area in the user interface shown in fig. 6C as an example, fig. 14 shows a schematic diagram of the relationship between the three parameters L, X, and Y, the dynamic content, and the scrollable area.
Wherein, the value of the first distance can have the following three kinds of situations:
1. when the first distance H1 is H1= Y, fig. 15 (a) and fig. 15 (B) respectively exemplarily show a schematic diagram of a position change of the dynamic content in the scrollable area of the first user interface corresponding to the previous screen capture and the next screen capture.
It can be seen that, when the content in the scrollable area is scrolled by the height of the dynamic content excluding part of the dynamic content, the complete dynamic content is located at the bottom of the scrollable area in the content displayed on the first user interface corresponding to the next screen shot.
2. When the value of the first distance H2 is Y < H2 < L-X, fig. 16 (a) and 16 (B) respectively exemplarily show the position change schematic diagrams of the dynamic content in the scrollable area of the first user interface corresponding to the previous screen capture and the next screen capture.
It can be seen that, when the distance of scrolling the content in the scrollable area is greater than the height of the dynamic content excluding part of the dynamic content and less than the height of the scrollable area minus part of the height of the dynamic content, the complete dynamic content is located in the middle of the scrollable area in the content displayed on the first user interface corresponding to the next screenshot.
3. When the first distance H3 takes the value H3= L-X, fig. 17 (a) and 17 (B) respectively exemplarily show a schematic diagram of a position change of the dynamic content in a scrollable area of the first user interface corresponding to a previous screen capture and a subsequent screen capture.
It can be seen that when the content in the scrollable area is scrolled by a distance equal to the height of the scrollable area minus the height of the portion of the dynamic content, the complete dynamic content is located at the top of the scrollable area in the content displayed on the first user interface corresponding to the next screen shot.
In the same way, the image captured by the electronic device 100 last time is the image displayed in the user interface shown in fig. 9A, and in the process of scrolling, new content appears in the first area, at this time, the value of the first distance is the same as the three values, and in the case of different values, the position change of the new content in the scrollable area is the same. In contrast, the new content is not included or displayed in the previously captured image.
In some embodiments, if the new content suddenly appears after the electronic device 100 identifies that the new content is not located in the main layer, the electronic device 100 may not intercept the content of the layer where the new content is located when capturing the screen, where the electronic device 100 may determine the timing of capturing the screen again according to a preset threshold. In this way, even if new content suddenly appears during the scrolling of the screen shot, the long shot finally output by the electronic device 100 does not contain the new content, and the long shot screen is complete, continuous and accurate.
In other embodiments, the electronic device 100 may determine whether the distance that the content of the scrollable area is scrolled from the previous screen capture is within the range of the above formula, thereby determining the timing for the electronic device 100 to perform the screen capture again.
Specifically, during the previous screen capture, if no dynamic content exists in the first area or no new content appears in the first area, the electronic device 100 may continue to scroll the content in the scrollable area according to the preset threshold, and when the electronic device 100 recognizes that a portion of new content appears in the first area, the range of the first distance is determined. When the distance for scrolling the contents of the scrollable area is within the range of the first distance from the previous screen capture, the electronic device 100 again captures the contents currently displayed on the first user interface to obtain an image containing the complete new contents. When the distance by which the contents of the scrollable area are scrolled is not within the range of the first distance, the electronic device 100 continues to scroll the contents of the scrollable area.
In other embodiments, electronic device 100 may determine a length of time that the contents of the scrollable area need to be scrolled. That is, the electronic apparatus 100 may determine the timing of the next screen capture according to time. After the electronic device 100 intercepts the content displayed in the first user interface for the previous time, when the time for scrolling the content in the scrollable area reaches the duration, the electronic device 100 intercepts the content displayed in the current first user interface again, so that the dynamic content or the new content in the corresponding image obtained by the electronic device 100 is completely displayed.
In other embodiments, the electronic device 100 may mark a UI element determined to be dynamic content or new content in the first user interface, and the electronic device 100 intercepts content displayed by the current user interface when the electronic device 100 recognizes that the UI element is displayed completely during the process of scrolling the content in the scrollable area by the electronic device 100.
In general, when the electronic device 100 recognizes that a part of dynamic content or a part of new content exists in the first area, the electronic device 100 may adjust a next screen capturing timing, and when the dynamic content or the new content is completely displayed, trigger a next screen capturing.
S1044, when the scrolling distance of the content in the scrollable area reaches the preset threshold, the electronic device 100 intercepts the content currently displayed on the first user interface again, and obtains a corresponding image.
The preset threshold may be a distance that the contents of the scrollable area scroll during the previous screen capture and the next screen capture initially determined by the electronic device 100. Alternatively, the preset threshold may refer to a distance that contents of the scrollable area are scrolled during the first two screen shots of the electronic device 100.
That is, when the electronic device 100 does not recognize that there is a portion of dynamic content in the first region, the electronic device 100 may scroll and screen-capture the page content according to an initial scroll distance, or a distance by which the content of the scrollable region scrolls between the first two screen captures.
S1045, in the process of scrolling the content of the scrollable area, the electronic device 100 determines whether to end the scrolling screenshot.
Fig. 11 exemplarily shows that the electronic apparatus 100 may determine whether to end the scroll screen capture when performing S1043 or S1044. If the electronic device 100 determines to end the scrolling screen capture, then step S1046 is performed; otherwise, step S1042 is performed.
It is understood that the electronic device 100 may determine whether to end the scrolling when performing any one of steps S1041-S1044. This is not limited by the present application.
The electronic device 100 may determine whether to end the scrolling screen capture according to the following four ways:
1. the electronic device 100 has scrolled to the bottom-most end of the page
In some embodiments, the electronic device 100 may determine whether the page has been scrolled to the bottom of the page based on the UI elements in the page. Specifically, when the electronic device 100 recognizes that no other UI element exists below the bottom UI element in the content of the page currently displayed by the first user interface, the electronic device 100 may determine that the page has been scrolled to the bottom of the current page.
In other embodiments, the electronic device 100 may determine whether to scroll to the bottom of the page based on the similarity of the images. When the electronic device 100 has scrolled to the bottom of the current page, if the scrolled distance does not reach the first distance or the preset threshold, the content of the page currently displayed on the screen may be referred to as an active page. The electronic device 100 may continue to scroll up the active page, with the lower portion of the active page filled with blank pages. Until the scrolling distance reaches the first distance, the electronic device 100 may again intercept the content currently displayed on the screen to obtain a corresponding image. The electronic device 100 may compare the contents of the active page in the image with the previously captured image. When the similarity of the two images reaches a certain threshold, the electronic device 100 may determine that the current page has been scrolled to the bottom.
2. The electronic device 100 is still loading page content
In the process of scrolling the page upward by the electronic device 100, the page may be in a state of updating while scrolling. When the electronic device 100 moves to the bottom of the page whose loading is completed, the electronic device 100 may wait for the page to be loaded for a period of time, and if the page loading is completed within the period of time, the electronic device 100 may continue to scroll upward and update the page, and if the page is not completed within the period of time, the electronic device 100 determines to end the scrolling screen shot.
3. The length of page scrolling or the number of screen shots approaches a critical value
The electronic device 100 may determine whether to end the scrolling screen shot according to the efficiency of the background operation or the configuration of the resource. For example, the electronic apparatus 100 may set a maximum value for the total page scroll distance or the number of screen shots, and when the total page scroll distance or the number of screen shots is to reach the maximum value, the electronic apparatus 100 judges that the scroll screen shots are ended.
4. The electronic apparatus 100 detects a user operation of the user to end the scroll screen shot
Specifically, the user operation may be a user operation (such as a click operation in fig. 6E) by which the user acts on the screen. When the electronic apparatus 100 detects a user operation for the user to end the scroll screen capture, the electronic apparatus 100 determines to end the scroll screen capture function in response to the operation.
It can be seen that the electronic device 100 finishes the scrolling, and may be a result of determination made by the electronic device 100 according to its own condition, or may be a result of external input by the user. Then, when the electronic device 100 finishes scrolling the screen shot and the page is scrolled a distance that does not reach the first distance calculated by the electronic device 100, the last image acquired by the electronic device 100 may contain part of the dynamic content or part of the new content. For the processing of the partial dynamic content or the partial new content of the last image by the electronic device 100, reference may be made to the following embodiments, which are not described herein again.
S1046, the electronic device 100 finishes the scrolling screen capturing, captures the content displayed on the current first user interface, and obtains the corresponding last image.
After the electronic device 100 finishes the scrolling screen capture, a plurality of images can be obtained, the contents of the plurality of images can be different, or partial images with the same content can exist in the plurality of images.
The following situations exist in the first image and the second image obtained by the electronic device 100 at adjacent time points:
1. the first image obtained by the electronic device 100 may be the first image obtained by the electronic device 100. Alternatively, the first image may be an image that the electronic device 100 intercepts during scrolling of the contents of the scrollable area.
2. The second image obtained by the electronic device 100 may be an image that the electronic device 100 has intercepted during the scrolling of the content of the scrollable area. Alternatively, the second image may be the last image acquired by the electronic device 100.
Illustratively, referring to fig. 6C, the first user interface may refer to the user interface 310, and the first image may refer to an image taken when the electronic device 100 displays the user interface shown in fig. 6C, that is, an image shown in (a) of fig. 7. Referring to fig. 6D, the second image may refer to an image taken when the electronic device 100 displays the user interface shown in fig. 6D, that is, an image shown in (B) of fig. 7. The first region may refer to a region where the video control 314 of a portion of the first user interface display is located.
Illustratively, referring to fig. 9A, the first user interface may refer to the user interface 310, and the first image may refer to an image captured when the electronic device 100 displays the user interface shown in fig. 9A. Referring to fig. 9B, the second image may refer to an image taken when the electronic device 100 displays the user interface illustrated in fig. 9B. The first region may be referred to as region B.
And (3) stage: splicing
S105, the electronic device 100 splices the multiple images into a long screenshot.
In the process of splicing the images by the electronic device 100, the electronic device 100 may cut out a partial area in the image first, and then splice the cut images in an end-to-end splicing manner.
The content cropped by the electronic device 100 differs for different images obtained by the electronic device 100 in different situations. The following three cases can be specifically included:
1. for each image obtained by the electronic device 100, the content that the electronic device 100 needs to cut out includes the content of the non-scrollable area, but for the first image, the intermediate image, and the last image obtained by the electronic device 100, the electronic device 100 needs to cut out the content of different areas in the non-scrollable area.
Wherein the non-scrollable area may be divided into two parts: a top non-scrollable area and a bottom non-scrollable area.
Illustratively, referring to fig. 6B, the top non-scrollable area may refer to an area where the status bar 211 and the first menu bar 311 are located, and the bottom non-scrollable area may refer to an area where the second menu bar 313 is located. Referring to the images shown in fig. 7 (a) -7 (C), the top non-scrollable area corresponds to area 401 in the image and the bottom non-scrollable area corresponds to area 404 in the image.
Since the content in the non-scrollable area does not change position as the page is scrolled during the screen capture of the electronic device 100, the image obtained by the electronic device 100 each screen capture contains non-scrollable content (e.g., a menu bar) in the page content and content provided by the system application (e.g., a status bar). However, in the long shot finally obtained by the electronic device 100, only the content in the top non-scrollable area in one image and the content in the bottom non-scrollable area in one image should be retained.
When the electronic device 100 scrolls the screen capture in the bottom-up direction, for the first image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area at the bottom end of the image. For an intermediate image obtained by the electronic device 100, the electronic device 100 intercepts content outside the non-scrollable area of the image, the non-scrollable area including a bottom non-scrollable area and a top non-scrollable area. For the last image obtained by the electronic device 100, the electronic device 100 intercepts content outside the non-scrollable area at the top of the image.
When the electronic device 100 scrolls the screen capture in the top-down direction, for the first image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area at the top of the image. For an intermediate image obtained by the electronic device 100, the electronic device 100 intercepts content outside the non-scrollable area of the image, the non-scrollable area including a bottom non-scrollable area and a top non-scrollable area. For the last image obtained by electronic device 100, electronic device 100 intercepts content outside the non-scrollable area at the bottom of the image.
In a specific implementation, when the electronic device 100 acquires the height of the scrollable area in the first user interface, the position and the height of the non-scrollable area may be acquired, and the electronic device 100 may respectively crop the content in each image acquired by the electronic device 100 according to the position and the height of the non-scrollable area.
2. For two adjacent images obtained by the electronic device 100 and related to dynamic content or new content, the content that needs to be cropped by the electronic device 100 is the content of the first area in the previous image
The two adjacent images related to the dynamic content obtained by the electronic device 100 mean that, of the two images obtained by the electronic device 100 at adjacent time points, the former image contains a part of the dynamic content, and the latter image contains the whole dynamic content. For the two images, the electronic device may intercept the content of the previous image outside the area (i.e., the first area) where the part of the dynamic content is located.
Exemplarily, referring to (a), (B) in fig. 7, the area where the part of the dynamic content is located may be referred to as an area 403.
In a specific implementation, when the previous image including a part of dynamic content is captured, the electronic device 100 may identify a height of the dynamic content in the page content displayed in the user interface, where the height is a height of an area where the part of dynamic content is located, and a width of the area where the part of dynamic content is located may be a width of the scrollable area. The electronic device 100 may cut out a part of the dynamic content in the previous image according to the height and the width, and ensure that the last spliced long screenshot of the electronic device 100 does not include the part of the dynamic content in the image.
The two adjacent images related to the new content obtained by the electronic device 100 mean that, of the two images obtained by the electronic device 100 at adjacent time points, both of the two images include the first area in the page content, the area in the previous image does not include the new content, the area in the next image includes a part of the new content, and the next image includes the complete new content. For the two images, the electronic device 100 may intercept content outside the first area in the previous image.
For example, referring to fig. 9A-9B, the area in which the part of the dynamic content is located may be referred to as an area B.
In a specific implementation, when the electronic device 100 scrolls the page content upward, the electronic device 100 may calibrate a position of a bottom end of the first area when the previous image is captured, where the position is a position located at a bottom edge of the scrollable area in the page content currently displayed by the electronic device 100. In the process of continuing to scroll the electronic device 100, when new content appears in the page content, the electronic device 100 may determine the topmost position of the first area, which is the position of the top of the new content appearing in the page content, so that the electronic device 100 may obtain the height of the first area. Similarly, when the electronic device 100 scrolls the page content downwards, the electronic device 100 may mark the topmost position of the first area when the previous image is captured, where the position is the position at the top edge of the scrollable area in the page content displayed by the electronic device 100 when the current screen capture is performed. In the process of continuing to scroll the electronic device 100, when new content appears in the page content, the electronic device 100 may determine the topmost position of the first area, which is the bottom position of the new content appearing in the page content, so that the electronic device may obtain the height of the first area. In addition, the width of the first area is the width of the scrollable area. The electronic device 100 can cut the content in the previous image according to the height and the width, and it is ensured that the last long screenshot spliced by the electronic device 100 is not spliced disorderly.
3. For two images obtained by the electronic device 100 at adjacent time points, the content that needs to be cut by the electronic device 100 includes the content of the repeated area, so that the phenomenon that the content of the repeated area appears in the long screenshot obtained by splicing the electronic device 100 is avoided.
Specifically, for the repeated content in two adjacent images obtained by the electronic device 100, the electronic device 100 may crop the repeated content in only one of the images, and retain the repeated content in the other image.
For example, referring to fig. 7, the overlapping region of the two images shown in fig. 7 (a) and 7 (B) may be referred to as a region 402, and the overlapping region of the two images shown in fig. 7 (B) and 7 (C) may be referred to as a region 405.
The repeated content is located in the scrollable area, and the electronic device 100 may determine the splicing position of the two images according to the repeated area, so as to splice the multiple images. For two images generated before and after, the electronic device 100 may determine the overlapping area according to the following two ways:
1) The electronic equipment 100 performs pixel-by-pixel comparison on the two images, and determines a repetition region according to the similarity of the images;
specifically, the electronic device 100 may compare content within the scrollable area of the image. The electronic device 100 may determine an area where the contents of the two images are similar, and when the similarity exceeds a certain threshold, the electronic device 100 determines that the contents in the area are the overlapping area of the two images.
In some embodiments, the electronic device 100 may set the size of the overlap region not to be less than a certain value, and the electronic device 100 may further define the size of the first distance according to the size of the overlap region. Specifically, when the electronic device 100 sets that the ratio of the heights of the repeated area and the scrollable area is not less than M, the area range of the first distance is that Y is not less than L-X-L × M.
2) And the electronic equipment 100 determines the repeated area according to the distance of scrolling the page content after the screen capturing is performed twice.
Specifically, the electronic device 100 may determine the repetition region according to a ratio of a distance that the content of the scrollable region is scrolled to a height of the scrollable region in two previous and subsequent screenshots. For example, if the direction in which the electronic device 100 scrolls is upward, and when the ratio of the distance that the content of the scrollable area scrolls to the height of the scrollable area is 50%, it is described that half of the content in the page is moved upward and updated during two screen shots before and after the electronic device 100, the lower half of the previous image and the upper half of the next image in the images respectively captured before and after scrolling are the overlapping areas of the two images.
The determination of the overlapping area is not limited to the above-described manner, and the present application does not limit this.
It is understood that, for the two images in case 2, the repeated area may include the first area, and when the electronic device 100 crops the repeated area, the content in the repeated area in the previous image may be cropped, and the content in the repeated area in the next image may be retained. Specifically, when the electronic apparatus 100 determines the repetition region according to the similarity of the images, if the similarity threshold set by the electronic apparatus 100 is low, or the electronic apparatus determines the repetition region according to the distance of page scrolling, the first region may be located within the repetition region, for example, referring to the images shown in (a) in fig. 7 and (B) in fig. 7, the repetition region of the two images may be a region where the sum of the region 402 and the region 403 is located, and the first region is the region 403.
In some embodiments, for the last image captured by the electronic device 100, if the last image contains a part of the dynamic content or the new content that has appeared in the previous image, the electronic device 100 may capture a part of the dynamic content or a part of the content outside the area where the new content is located in the image, and then stitch the captured part of the dynamic content or the new content with another image.
The height of the area in which the part of the dynamic content or the part of the new content is located may be the height of the part of the dynamic content or the part of the new content, and the width may be the width of the scrollable area.
For example, referring to fig. 7 (C), the area in which the part of the dynamic content or the part of the new content is located may be referred to as an area 406.
The timing of the last image being captured by the electronic device 100 may be triggered according to the operation of the user ending the scrolling screen capture, or may be the case that the content of the page has been scrolled to the bottom, and so on. At this time, the last image may still contain a part of dynamic content or a part of new content, and when the electronic device 100 determines the splicing area of the two images according to the similarity of the two images, the last image and the previous image may be spliced in a disordered manner.
Referring to fig. 6E, when the electronic device 100 detects that the user triggers the operation of ending the scroll screenshot, referring to fig. 6F, the electronic device 100 intercepts the last image and ends the scroll screenshot, and at this time, the last image intercepted by the electronic device 100 still contains part of the dynamic content.
Specifically, when the electronic device 100 scrolls from bottom to top, if the top of the last image contains a part of dynamic content or a part of new content, the electronic device 100 may intercept the part of dynamic content or the part of content outside the area where the part of new content is located. When the electronic device 100 scrolls from top to bottom, if the bottom of the last image contains a part of dynamic content or a part of new content, the electronic device 100 may intercept the content outside the area where the part of dynamic content or the part of new content is located.
The first image and the second image obtained by the electronic device 100 at adjacent time points in step S104.
Wherein, the first image has the following situations:
1. if the first image is the first image obtained after the electronic device 100 starts the scrolling screen capture. When the scrolling direction of the electronic device 100 is from bottom to top, the region to be cropped in the first image includes a bottom non-scrollable region, a first region, and a repeat region. When the electronic device 100 scrolls from top to bottom, the region to be cropped in the first image includes a top-end non-scrollable region, a first region, and a repeat region.
2. If the first image is an intermediate image obtained in the intermediate scrolling process after the electronic device 100 starts the scrolling screen capture, and the image is neither the first image nor the last image, the area to be cropped in the first image includes a non-scrollable area (including a top non-scrollable area and a bottom non-scrollable area) and the first area.
The second image has the following conditions:
1. if the second image is an intermediate image obtained in the process of intermediate scrolling after the electronic device 100 starts scrolling and captures a screen, and the image is neither the first image nor the last image, the area to be cropped in the second image is an un-scrollable area (including a top un-scrollable area and a bottom un-scrollable area).
2. If the second image is the last image obtained after the electronic device 100 starts the scrolling screen capture, the region to be cropped in the second image includes the top non-scrollable region.
Then, the electronic device 100 splices all the cut images end to end according to the sequence of image generation to obtain a final long screenshot. Finally, after electronic device 100 finishes stitching, the long screenshot that is obtained is displayed in a user interface (e.g., the user interface shown in FIG. 6F).
The head-to-tail stitching refers to stitching two adjacent images according to the sequence of the images obtained by the electronic device 100 and the repeat areas of the two adjacent images determined by the electronic device 100, and after the stitching, the repeat areas of the two adjacent images are overlapped.
Illustratively, fig. 18 illustrates a stitching process diagram of the electronic device 100 stitching the screenshot according to the repeat region of the adjacent image. The overlapping area of the two cropped images shown in fig. 18 (a) and 18 (B) is an area 402, and the electronic device may superimpose the image shown in fig. 18 (a) and the area 402 of the image shown in fig. 18 (B) together to splice the two images. Similarly, the overlapping area of the two cropped images shown in fig. 18 (B) and 18 (C) is the area 405, and the electronic device can superimpose the image shown in fig. 18 (B) and the area 405 of the image shown in fig. 18 (C) together to splice the two images. In this way, the electronic apparatus 100 can finally stitch the long shot shown in (D) in fig. 18 from the images shown in (a) in fig. 18 to (C) in fig. 18.
In summary, the screen capture method provided in the embodiment of the present application can identify part of dynamic content or part of new content existing in the user interface, cut out part of dynamic content or part of new content existing in the image, and adjust the timing of the next screen capture, so that the next captured image can contain complete dynamic content or new content. Therefore, the screen capture process is not influenced by dynamically changed contents, the electronic equipment can output complete and accurate long screenshots, and the experience of a user is improved.
The following describes a flow of a scrolling screenshot method provided in an embodiment of the present application.
Fig. 19 shows a flowchart of a screen capture method provided in an embodiment of the present application.
S201, the electronic device 100 runs a first application program and displays a first user interface.
Illustratively, referring to FIG. 6B, the first application may be referred to as a "micro-blogging" application and the first user interface may be referred to as user interface 310.
Wherein the first user interface may include: a scrollable area and a non-scrollable area.
The scrollable area refers to an area in the user interface where the content of the display position can be changed in response to an operation by the user (e.g., a gesture of sliding up and down). Such as the area where information bars, pictures, message lists, etc. are located. In contrast, a non-scrollable area refers to an area in the user interface where the content of the display position cannot be changed in response to an operation (e.g., a gesture of sliding up and down) by the user, fixed in the screen. Such as the region in which the menu bar, return control, title bar, etc. are located.
Referring to fig. 6B, the scrollable area may refer to an area where the information bar 312 is located, and the non-scrollable area may refer to an area where the first menu bar 311 and the second menu bar 313 are located.
S202, the electronic device 100 receives the first operation.
Specifically, the first operation is not limited to a single click, a double click, a long press, a voice instruction input, or the like. Illustratively, referring to fig. 6B, the user operation may be an interface operation in which the user draws "S" on the screen with a finger joint.
S203, the electronic device 100 responds to the first operation and displays the first page content provided by the first application program in a scrolling mode in the first user interface.
In particular, the first page content may refer to scrollable content in page content provided by the first application.
The electronic device 100 scrolling the first page content provided by the first application in the first user interface means that the electronic device 100 scrolling the first page content provided by the first application in the scrollable area.
The page content provided by the first application may be a long page content, which contains two parts: scrollable content, non-scrollable content. Scrollable content may follow a user operation (e.g., a swipe up and down gesture) to change the display position, and non-scrollable content may not follow a user operation (e.g., a swipe up and down gesture) to change the display position. The non-scrollable content is displayed in a non-scrollable area in the first user interface, and the scrollable content is displayed in a scrollable area in the first user interface.
Illustratively, referring to fig. 6B, the content displayed in the information bar 312 is a part of the content in the first page content, and in the process of scrolling the screen capture by the electronic device 100, referring to fig. 6D, another part of the content in the first page content is scrolled and displayed in the information bar 312. Exemplarily, referring to fig. 7 (D), the first page content may refer to content other than the area 401 and the area 404 in the image shown in fig. 7 (D).
S204, in the process of scrolling and displaying the first page content provided by the first application program in the first user interface, the electronic equipment 100 intercepts the content displayed at different time points to obtain a plurality of images; the plurality of images comprise a first image and a second image, the first image comprises first content of a first area in the first page content, the second image comprises second content of the first area in the first page content, and the first content and the second content are different.
The first content and the second content being different may include the following two cases:
1. the first page content includes dynamic content
Dynamic content refers to content that itself dynamically changes, such as dynamically changing videos, pictures, icons, controls, text, or tables. The dynamic change of the content can be in various forms, for example, the dynamic change of the content can comprise the change of video pictures, the change of picture contents, the change of colors, the change of sizes, the change of angles, the change of positions and the like.
Specifically, the first content and the second content are different, that is, the first content in the first image includes a part of the first screen in the dynamic content, and the second image includes the second screen in the dynamic content.
Illustratively, the dynamic content may refer to the video control 314 shown in fig. 6C, the first image may refer to an image displayed in the user interface shown in fig. 6C when the electronic device 100 opens the scrolling screen capture, and the first content is content of a portion of the video control 314 displayed in the area a in the user interface shown in fig. 6C. The second image may refer to the image shown in fig. 6D displayed in the user interface during the scrolling of the screen capture, and the second content is the content of the portion of the video control 314 displayed in the area a in the user interface shown in fig. 6D. The first area is an area a in the page content, and as can be seen from the area a in fig. 6C and fig. 6D, the content displayed in the area a by the video control 314 is changed, that is, the content displayed in the video control 314 is changed from the first picture to the second picture.
2. The first page content includes new content
The new content refers to a content suddenly appearing in a certain area in the content of the first page, such as a popup advertisement, a suddenly appearing icon, a prompt box, and the like.
In the embodiment of the present application, the new content may also refer to third content.
Specifically, after the electronic device intercepts the first image, third content appears in the first page content. The first content and the second content are different, that is, the first image does not include the third content, the second image includes the third image, and the second content includes a part of the third content.
Illustratively, the third content may refer to the treasure box control 316 shown in fig. 9B, and the first image may refer to an image displayed in the user interface shown in fig. 9A when the electronic device 100 starts the scrolling screen capture, where the first content is the content displayed in the area B in the user interface shown in fig. 9A. The second image may be an image shown in fig. 9B displayed in the user interface during the scrolling of the electronic device 100, and the second content is the content of the part of the treasure box control 316 displayed in the area B in the user interface shown in fig. 9B. The first region is region B in the page content, and as can be seen from regions B in fig. 9A and 9B, the content displayed in region a changes due to the appearance of the treasure box control 316.
Specifically, the first area is an area in the first page content; when the electronic device 100 scrolls to display the first page content, the first area moves along with the movement of the first page content. Fig. 20 is a schematic diagram illustrating a position relationship between the first page content and the first area. The first page content is a part of the long page content, and the first area is used for indicating the position relation between the part of the first page content and the first page content.
When the electronic device 100 captures a screen, the electronic device 100 may determine a position of a first area, and when the electronic device 100 scrolls and displays first page content provided by a first application program in a first direction, the first direction is directed from a first end to a second end, and when the electronic device 100 captures a first image, the first area is close to the scrollable area, that is, an area close to the first end in the first page content displayed by the electronic device 100. Specifically, the position of the area a in fig. 6C or the position of the area B in fig. 9A can be referred to. Further, when dynamic content or new content appears in the first area, the electronic device 100 may determine the extent of the first area.
In a possible implementation manner, the electronic device 100 intercepts content displayed by the electronic device 100 at a first time point, obtains the first image, intercepts the content displayed by the electronic device when the electronic device 100 scrolls to display the first page content for a first distance after the first time point, and obtains a second image, where the second image includes complete dynamic content or complete third content, and the first distance is a height according to the height of the first region, the height of the complete dynamic content or the complete third content, and the height of the first page content displayed in the first user interface.
Specifically, the electronic device 100 may determine the first distance according to the following formula:
y is less than or equal to the first distance L-X
Where L refers to the height at which the first page content is displayed in the first user interface (or the height of the scrollable area), X refers to the height of the first area, and Y refers to the full dynamic content or the full third content minus the height of the first area. With specific regard to the relationship between the three parameters L, X, Y and the dynamic content and the scrollable area, reference is made to fig. 14 and the associated description.
Optionally, the electronic device 100 may intercept the content displayed by the electronic device 100 and obtain a first image of the plurality of images when receiving the first operation.
Alternatively, the electronic device 100 may intercept the content displayed by the electronic device 100 and obtain the last image of the plurality of images when the scrolling of the first page content is stopped.
Optionally, the electronic device 100 may intercept the content displayed by the electronic device 100 and obtain the last image of the plurality of images when receiving the second operation. Illustratively, the second image may be a click operation as shown in FIG. 6E.
S205, the electronic equipment splices the multiple images into a long screenshot, and the long screenshot does not contain the first content and contains the second content.
Illustratively, the long shot may refer to an image displayed by the long shot thumbnail 414 shown in fig. 6G, or, referring to fig. 7, the long shot may refer to an image shown in (D) in fig. 7, the first content may refer to content in the area 403 shown in (a) in fig. 7, and the second content may refer to content in the area 403 shown in (B) in fig. 7.
In the process of splicing the images by the electronic device 100, the electronic device 100 may cut out a partial area in the screenshot first, and then splice the cut images in an end-to-end splicing manner.
Since the content in the non-scrollable area does not change position as the page is scrolled during the screen capture of the electronic device 100, the image obtained by the electronic device 100 each screen capture contains non-scrollable content (e.g., a menu bar) in the page content and content provided by the system application (e.g., a status bar). In the long shot finally obtained by the electronic device 100, only the content in the top non-scrollable area in one image and the content in the bottom non-scrollable area in one image are retained.
For content in the bottom non-scrollable area, the electronic device 100 may have different cropping patterns for content in the area in different images under different circumstances.
In one possible implementation, the electronic device 100 can crop away the content of the second area in the first image. When the electronic device 100 scrolls to display the first page content along the direction from bottom to top, the second area is: when the electronic device intercepts the first image, the electronic device 100 displays an area close to the lower end in the content of the second page; when the electronic device scrolls and displays the first page content along the direction from top to bottom, the second area is as follows: when the electronic device 100 intercepts the first image, the electronic device displays a region close to the upper end in the second page content.
Illustratively, when the electronic device 100 scrolls to display the first page content in a direction from bottom to top, fig. 7 (a) shows the first image being taken by the electronic device 100, and the second region may be referred to as a region 404.
In a possible implementation manner, when the electronic device 100 scrolls and displays the content of the first page in the direction from bottom to top, if the second image is the last image in the multiple images, the long screenshot includes the content of a third area in the second image, and the third area is: and when the electronic equipment intercepts the second image, the electronic equipment displays an area close to the lower end in the second page content.
Illustratively, referring to fig. 7 (C), the last image intercepted by the electronic device 100 may refer to the image shown in fig. 7 (C), and the third area may refer to the area 404 shown in fig. 7 (C).
In a possible implementation manner, when the electronic device 100 scrolls and displays the content of the first page in the top-down direction, if the first image is the first image in the multiple images, the screenshot includes the content of a fourth area in the first image, and the fourth area is: and when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the lower end in the second page content. Exemplarily, referring to fig. 7 (a), the fourth region may refer to a region 404.
For content in the top non-scrollable area, the top portion content of the second page content provided by the first application program and the status bar may be included, and in different cases, the electronic device 100 may have different cropping modes for the content in the area in different images.
In one possible implementation, if electronic device 100 scrolls to display the first page content in a bottom-up direction, the long shot does not contain a status bar in the second image. If electronic device 100 scrolls to display the first page content in a top-down direction, the long shot does not contain a status bar in the first image.
Illustratively, the status bar may refer to the status bar 211 shown in FIG. 6B.
In another possible implementation, if the electronic device 100 scrolls to display the first page content in the bottom-up direction, if the first image is the first image of the plurality of images, the long shot includes the status bar in the first image. If the electronic device 100 scrolls to display the first page content in the top-down direction, if the second image is the last image of the plurality of images, the long screenshot includes a status bar in the second image.
For two adjacent images, the electronic device 100 may crop the repeated content of one image and the other image, and splice the two adjacent images according to the repeated area where the repeated content is located.
The electronic device 100 may determine the repeated regions of two adjacent images according to the following two ways: 1) The electronic device 100 performs pixel-by-pixel comparison on the two images, and determines a repetition region according to the similarity of the images; 2) The electronic device 100 determines the repeat region according to the distance of scrolling the page content after the two screen shots. For the specific way for the electronic device 100 to determine the repetition region, reference may be made to the foregoing contents, which are not described herein again.
In one possible implementation, if the first area is a repeated area of the first image and the second image, the electronic device 100 intercepts content in the first image outside the first area; the electronic device 100 splices the first image and the second image after the cropping, and the first region in the second image after the splicing is located at the position of the first image after the cropping, and the first region in the first image before the splicing is located at the position of the first image are the same.
In another possible implementation, if the first area is a part of the repeated area of the first image and the second image, the content of the fifth area of the first image and the second image is identical.
Exemplarily, referring to fig. 7, the first region may refer to a region 403, and the fifth region may refer to a region 402.
Specifically, the electronic device 100 intercepts content in the first image except for a sixth area, which includes the first area and the fifth area; the electronic device 100 splices the first image and the second image after the cropping, and the position of the sixth area in the second image after the splicing is located in the first image after the cropping is the same as the position of the sixth area in the first image before the splicing.
That is, the electronic device 100 may intercept an image outside the total area of the area 403 and the area 402 in the first image as shown in fig. 7 (a), and then stitch the image with the second image as shown in fig. 7 (B), where the area 403 and the area 402 of the first image overlap with the area 403 and the area 402 of the second image after stitching.
Optionally, the electronic device 100 intercepts content outside the fifth area in the second image, and the electronic device intercepts content outside the first area in the first image; the electronic device 100 splices the second cropped image and the first cropped image, and after splicing, the fifth area in the first cropped image is located at the position of the second cropped image, and before splicing, the fifth area in the second image is located at the position of the second image, which is the same.
That is, the electronic device 100 may cut out an image other than the region 403 in the first image as shown in fig. 7 (a), cut out an image other than the region 402 in the second image as shown in fig. 7 (B), and then stitch the two cut-out images, after stitching, the region 402 of the first image and the region 402 of the second image are overlapped, and the region 403 of the first image and the region 403 of the second image are overlapped, so that the electronic device 100 stitches the obtained multiple images, and thus a long screenshot can be obtained.
The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention are intended to be included within the scope of the present invention.

Claims (17)

1. A method of screen capture, the method comprising:
the electronic equipment runs a first application program and displays a first user interface;
the electronic equipment receives a first operation;
the electronic equipment responds to the first operation and displays first page content provided by the first application program in a scrolling mode in the first user interface;
in the process of scrolling and displaying first page content provided by the first application program in the first user interface, the electronic equipment intercepts content displayed at different time points to obtain a plurality of images; wherein the plurality of images include a first image containing first content of a first area in the first page content and a second image containing second content of the first area in the first page content, the first content and the second content being different;
and the electronic equipment splices the images into a long screenshot, wherein the long screenshot does not contain the first content and contains the second content.
2. The method of claim 1, wherein the first region moves with the first page content when the electronic device scrolls to display the first page content.
3. The method according to claim 1 or 2, characterized in that the electronic device scrolls and displays the first page content provided by the first application program in the first user interface along a first direction, wherein the first direction is from a first end to a second end;
the first region is: when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the first end in the first page content.
4. The method according to any of claims 1-3, wherein the first page content comprises dynamic content,
the first content comprises a part of a first picture in the dynamic content;
the second image includes a second picture in the dynamic content.
5. The method of any of claims 1-4, wherein the electronic device, after intercepting the first image, presents third content in the first page content,
the first image does not contain the third content,
the second image includes the third content, and the second content includes a portion of the third content.
6. The method according to claim 5, wherein the electronic device intercepts content displayed at different time points to obtain a plurality of images, and specifically comprises:
the electronic equipment intercepts the content displayed by the electronic equipment at a first time point to obtain the first image;
after the first time point, when the distance of the electronic equipment for scrolling the first page content reaches a first distance, intercepting the content displayed by the electronic equipment to acquire the second image;
the second image contains the entire dynamic content or the entire third content;
the first distance is calculated according to the height of the first area, the height of the complete dynamic content or the complete third content and the height of the first page content displayed in the first user interface.
7. The method of claim 6, wherein the electronic device determines the first distance according to the following equation:
y is less than or equal to the first distance L-X
Wherein L refers to a height at which the first page content is displayed in the first user interface, X refers to a height of the first region, and Y refers to the height of the first region subtracted from the complete dynamic content or the complete third content.
8. The method of any of claims 1-7, wherein the first user interface comprises: a scrollable area and a non-scrollable area, the non-scrollable area displaying second page content provided by the first application;
the method for scrolling and displaying the first page content provided by the first application program in the first user interface by the electronic device specifically includes: the electronic equipment scrolls and displays first page content provided by the first application program in the scrollable area;
the long shot does not include the content of the second region in the first image,
when the electronic device scrolls and displays the first page content along the direction from bottom to top, the second area is: when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the lower end in the second page content;
when the electronic device displays the first page content in a rolling manner along a direction from top to bottom, the second area is: and when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the upper end in the second page content.
9. The method of claim 8,
when the electronic device scrolls to display the first page content along the direction from bottom to top,
if the second image is the last image of the plurality of images, the long screenshot comprises the content of a third area in the second image, and the third area is: when the electronic equipment intercepts the second image, the electronic equipment displays an area close to the lower end in the second page content;
or,
when the electronic equipment scrolls and displays the first page content along the direction from top to bottom,
if the first image is the first image of the plurality of images, the long screenshot comprises the content of a fourth area in the first image, and the fourth area is: and when the electronic equipment intercepts the first image, the electronic equipment displays an area close to the lower end in the second page content.
10. The method of any of claims 1-9, wherein the first user interface comprises: a scrollable area and a non-scrollable area, the non-scrollable area displaying a status bar;
the method for scrolling and displaying the first page content provided by the first application program in the first user interface by the electronic device specifically includes: the electronic equipment scrolls and displays first page content provided by the first application program in the scrollable area;
if the electronic device scrolls to display the first page content in a direction from bottom to top, the long screenshot does not include the status bar in the second image;
if the electronic equipment scrolls to display the first page content along the direction from top to bottom, the long screenshot does not include the status bar in the first image.
11. The method of claim 10,
when the electronic equipment scrolls and displays the first page content along the direction from bottom to top,
if the first image is a first image of the plurality of images, the long screenshot comprises the status bar in the first image;
when the electronic equipment scrolls and displays the first page content along the direction from top to bottom,
if the second image is the last image of the plurality of images, the long screenshot comprises the status bar in the second image.
12. The method according to any one of claims 1 to 11, wherein the electronic device intercepts content displayed at different time points to obtain a plurality of images, and specifically comprises:
when the electronic equipment receives the first operation, intercepting the content displayed by the electronic equipment to obtain a first image in the plurality of images;
or,
when the electronic equipment stops displaying the first page content in a rolling mode, intercepting the content displayed by the electronic equipment to obtain the last image in the multiple images;
or,
and the electronic equipment intercepts the content displayed by the electronic equipment in response to the received second operation, and obtains the last image in the multiple images.
13. The method according to any one of claims 1 to 12, wherein the electronic device concatenates the plurality of screenshots into a long screenshot, specifically including:
the electronic equipment intercepts content outside a first area in the first image;
and the electronic equipment splices the first image and the second image after being cropped, wherein the first area in the second image after being spliced is positioned at the position of the first image after being cropped, and the first area in the first image before being spliced is positioned at the position of the first image, and the first area and the second area are the same.
14. The method according to any one of claims 1-13 wherein the first page content further comprises a fifth region, the first image and the second image each containing the content of the fifth region, the fifth region being adjacent to the first region;
the electronic equipment splices the screenshots into long screenshots, and specifically includes:
the electronic equipment intercepts content in the first image except for a sixth area, wherein the sixth area comprises the first area and the fifth area;
splicing the first image and the second image after being cut by the electronic equipment, wherein the sixth area in the second image after being spliced is positioned at the position of the first image after being cut, and the sixth area in the first image before being spliced is positioned at the position of the first image, and the sixth area is the same;
or,
the electronic equipment intercepts content outside the fifth area in the second image, and the electronic equipment intercepts content outside the first area in the first image;
and the electronic equipment splices the second image after being cut and the first image after being cut, and after splicing, the fifth area in the first image after being cut is positioned at the position of the second image after being cut, and the fifth area in the second image before being spliced is positioned at the position of the second image, which are the same.
15. An electronic device, comprising: one or more processors, a display screen, one or more memories; wherein the display screen, one or more memories for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-14, are coupled with the one or more processors.
16. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-14.
17. A computer program product, characterized in that it causes a computer to carry out the method according to any one of claims 1 to 14 when said computer program product is run on a computer.
CN202110482108.9A 2021-04-30 2021-04-30 Screen capture method, graphical interface and electronic equipment Pending CN115268741A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110482108.9A CN115268741A (en) 2021-04-30 2021-04-30 Screen capture method, graphical interface and electronic equipment
PCT/CN2022/086168 WO2022228101A1 (en) 2021-04-30 2022-04-11 Screen capturing method, graphical interface, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110482108.9A CN115268741A (en) 2021-04-30 2021-04-30 Screen capture method, graphical interface and electronic equipment

Publications (1)

Publication Number Publication Date
CN115268741A true CN115268741A (en) 2022-11-01

Family

ID=83745695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110482108.9A Pending CN115268741A (en) 2021-04-30 2021-04-30 Screen capture method, graphical interface and electronic equipment

Country Status (2)

Country Link
CN (1) CN115268741A (en)
WO (1) WO2022228101A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572056A (en) * 2013-10-24 2015-04-29 阿里巴巴集团控股有限公司 Page comparison method and device
CN107329668A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 A kind of method for realizing long sectional drawing, mobile terminal and computer-readable recording medium
CN107657583A (en) * 2017-08-29 2018-02-02 努比亚技术有限公司 A kind of screenshot method, terminal and computer-readable recording medium
CN109934769A (en) * 2019-04-26 2019-06-25 努比亚技术有限公司 Method, terminal and the storage medium of the long screenshot of screen
CN110032314A (en) * 2019-03-12 2019-07-19 中国平安人寿保险股份有限公司 A kind of long screenshotss method, apparatus, storage medium and terminal device
CN110209456A (en) * 2019-05-31 2019-09-06 努比亚技术有限公司 Method, mobile terminal and the computer readable storage medium of the long screenshot of screen interface
CN110968391A (en) * 2019-11-28 2020-04-07 珠海格力电器股份有限公司 Screenshot method, screenshot device, terminal equipment and storage medium
CN111143013A (en) * 2019-12-30 2020-05-12 维沃移动通信有限公司 Screenshot method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10656818B1 (en) * 2013-03-13 2020-05-19 Domo, Inc. Animation to indicate scrollable content
CN105872810B (en) * 2016-05-26 2019-05-03 网易传媒科技(北京)有限公司 A kind of media content sharing method and device
CN106802758B (en) * 2017-01-05 2020-11-24 青岛海信移动通信技术股份有限公司 Processing method and device for screen capture
CN107229402B (en) * 2017-05-22 2021-08-10 努比亚技术有限公司 Dynamic screen capturing method and device of terminal and readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572056A (en) * 2013-10-24 2015-04-29 阿里巴巴集团控股有限公司 Page comparison method and device
CN107329668A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 A kind of method for realizing long sectional drawing, mobile terminal and computer-readable recording medium
CN107657583A (en) * 2017-08-29 2018-02-02 努比亚技术有限公司 A kind of screenshot method, terminal and computer-readable recording medium
CN110032314A (en) * 2019-03-12 2019-07-19 中国平安人寿保险股份有限公司 A kind of long screenshotss method, apparatus, storage medium and terminal device
CN109934769A (en) * 2019-04-26 2019-06-25 努比亚技术有限公司 Method, terminal and the storage medium of the long screenshot of screen
CN110209456A (en) * 2019-05-31 2019-09-06 努比亚技术有限公司 Method, mobile terminal and the computer readable storage medium of the long screenshot of screen interface
CN110968391A (en) * 2019-11-28 2020-04-07 珠海格力电器股份有限公司 Screenshot method, screenshot device, terminal equipment and storage medium
CN111143013A (en) * 2019-12-30 2020-05-12 维沃移动通信有限公司 Screenshot method and electronic equipment

Also Published As

Publication number Publication date
WO2022228101A1 (en) 2022-11-03

Similar Documents

Publication Publication Date Title
CN110119296B (en) Method for switching parent page and child page and related device
US11914850B2 (en) User profile picture generation method and electronic device
US20220374118A1 (en) Display Method and Electronic Device
US20240176628A1 (en) Display method for card component, graphical user interface, and related apparatus
WO2022222752A1 (en) Display method and related apparatus
CN114115618A (en) Application window display method and electronic equipment
US20240012534A1 (en) Navigation Bar Display Method, Display Method, and First Electronic Device
CN115237316A (en) Audio track marking method and electronic equipment
CN114237778A (en) Interface display method and electronic equipment
EP4365722A1 (en) Method for displaying dock bar in launcher and electronic device
WO2023005751A1 (en) Rendering method and electronic device
CN116204254A (en) Annotating page generation method, electronic equipment and storage medium
CN115268741A (en) Screen capture method, graphical interface and electronic equipment
CN114594894A (en) Interface element marking method, terminal device and storage medium
WO2022206645A1 (en) Method and apparatus for scrolling to capture screenshot
CN115567666B (en) Screen recording method, electronic device and readable storage medium
WO2023226975A1 (en) Display method and electronic device
WO2023051354A1 (en) Split-screen display method and electronic device
EP4270911A1 (en) Suspended ball processing method in multi-tasking scenario, and electronic device
WO2024027504A1 (en) Application display method and electronic device
WO2023045774A1 (en) Display method and electronic device
WO2024067122A1 (en) Window display method and electronic device
WO2023274093A1 (en) Method and apparatus for scrolling to capture screenshot
WO2023078088A1 (en) Display method and electronic device
CN117170540A (en) Content extraction method and device

Legal Events

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