Image generation method
By obtaining the first and second display data of the target display area from the graphics card and generating files containing the second display data, the problem that the user needs to operate screenshots again when the content of the display screen changes, simplifying the operation and improving the user experience.
Patent Information
- Application Number
- CN202411214979.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-03
AI Technical Summary
When taking screenshots, if the content of the display area of the display screen changes, you need to operate it again to take the screenshot, resulting in complex operations and possible missing important pictures, which makes the experience poor.
By obtaining the first display data of the target display area from the graphics card and automatically obtaining the second display data under the triggering condition, a file containing the second display data is generated, reducing the possibility of error screenshots and missing important screenshots.
Simplifies operational steps, reduces the risk of wrong screenshots and missing important pictures, and improves user experience.
Smart Images

Figure CN119065773A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to the field of image technology, and in particular to an image generation method. Background Art
[0002] In the related art, when a user takes a screenshot, if the displayed content in the display area of the display screen changes, there is often a need to take a screenshot again. At this time, the user needs to take a screenshot again, which results in a poor user experience. Summary of the invention
[0003] In view of this, an embodiment of the present application at least provides an image generating method.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] A method for generating an image, comprising:
[0006] In response to the target operation, obtaining first display data of the target display area from the graphics card;
[0007] In response to a change in display content of the target display area, if a triggering operation that triggers the change in display content of the target display area satisfies a triggering condition, obtaining second display data of the target display data from a graphics card;
[0008] A first file including second display data is generated; wherein the first display data and the second display data are used to form display content of a target display area on a display screen.
[0009] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0011] Figure 1 A schematic diagram of an implementation process of an image generation method provided in an embodiment of the present application Figure 1 ;
[0012] Figure 2 A schematic diagram of a target display area area change provided in an embodiment of the present application Figure 1 ;
[0013] Figure 3 A schematic diagram of a target display area area change provided in an embodiment of the present application Figure 2 ;
[0014] Figure 4 A schematic diagram of a triggering operation provided in an embodiment of the present application;
[0015] Figure 5 A schematic diagram of a display target control provided in an embodiment of the present application;
[0016] Figure 6 A schematic diagram of an implementation process of an image generation method provided in an embodiment of the present application Figure 2 ;
[0017] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application Figure 1 ;
[0018] Figure 8 A schematic diagram of a hardware entity of an electronic device provided in an embodiment of the present application;
[0019] Fig. 9 A hardware entity diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0021] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0022] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are merely to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0023] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those skilled in the art in the field to which the embodiments of the present application belong. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0024] In the related art, when a user takes a screenshot, if the display content in the display area of the display screen changes, there is often a need to take a screenshot again. At this time, the user needs to take a screenshot again, which has the problem of complicated operation. At the same time, some important pictures may be missed, resulting in a poor user experience.
[0025] The embodiment of the present application provides an image generation method, after obtaining the first display data of the target display area from the graphics card in response to the target operation, if the trigger operation that triggers the display content of the target display area to change satisfies the trigger condition, the second display data of the target display data is obtained from the graphics card, and then a first file containing the second display data is generated. In this way, on the one hand, it is necessary to determine whether the trigger operation satisfies the trigger condition before obtaining the second display data, which reduces the possibility of erroneous screenshots; on the other hand, after obtaining the first display data, the second display data is obtained again based on the trigger operation, and there is no need to manually trigger the screenshot again, which simplifies the operation steps and reduces the possibility of missing important pictures.
[0026] The method provided in the embodiment of the present application can be performed by an electronic device, which is equipped with a display screen. The electronic device can be a laptop, a tablet computer, a desktop computer, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device) and other types of terminals.
[0027] Figure 1 A schematic diagram of an implementation process of an image generation method provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the method includes steps S101 to S103, wherein:
[0028] Step S101, in response to a target operation, obtaining first display data of a target display area from a graphics card.
[0029] Here, the target operation is an operation instructing a user to obtain display data from a graphics card, for example, a screenshot operation of a user targeting a target display area.
[0030] In some embodiments, the electronic device implementing the image generation method of the present application is configured with a display screen and a physical button. The physical button can be any suitable button, for example, a power button, a volume button, etc. In implementation, the response target operation can be the display screen responding to receiving a gesture operation. The gesture operation can include but is not limited to: three-finger swipe, circle, long press, drag, etc. The response target operation can also be a physical button responding to receiving a press operation.
[0031] The graphics card is one of the basic components of electronic devices. It can convert display information, drive the display and provide progressive or interlaced scanning signals to the display, control the correct display of the display, and is an important component of the motherboard connecting the display and the electronic device. In some embodiments, the graphics card includes at least one display data, and the at least one display data is generated in response to at least one target operation. The at least one display data can be used to form the display content of the target display area on the display screen.
[0032] The first display data refers to the data displayed in the display area obtained from the graphics card. The first display data can be used to form the display content of the target display area on the display screen. In some embodiments, when the first display data is obtained, the display content of the target display area corresponding to the first display data can be formed in real time on the display screen through the first display data.
[0033] In some embodiments, the first display data may include, but is not limited to, vertex data, texture data, RGB pixel values, etc. Vertex data describes the shape and position of an image and is the basis of graphics rendering. Texture data is data used to increase the surface details of an object in graphics rendering. RGB pixel value is the basic unit of an image and represents a colored point in the image. Each pixel in an image has a specific color and position, and a collection of these pixels constitutes an image.
[0034] In some implementations, the latest display data may be obtained from the graphics card in response to the target operation, and the display data may be used as the first display data of the target display area, thereby obtaining the first display data of the target display area from the graphics card.
[0035] The target display area refers to an area on the display screen of the electronic device that can display display content. In some embodiments, the area of the target display area can change. In some embodiments, the area change of the target display area can be caused by manually scaling the area of the target display area. When the target display area is a display area included in the display screen, the area change of the target display area can be caused by a change in the size of the displayable area of the display screen of the electronic device.
[0036] For example, Figure 2 A schematic diagram of a target display area area change provided in an embodiment of the present application Figure 1 ,like Figure 2 As shown, the electronic device 20 has a display screen 21, which includes a target display area 22. A photo is displayed in the target display area 22. The target display area 22 can be manually reduced to obtain a reduced target display area 23, thereby reducing the area of the target display area.
[0037] Figure 3 A schematic diagram of a target display area area change provided in an embodiment of the present application Figure 2 ,like Figure 3 As shown, the electronic device 30 has a display screen 31, and the target display area is the display area included in the display screen 31. The display area of the display screen 31 can be increased by extending the screen to obtain an enlarged display screen 32, and the display area included in the enlarged display screen 32 is used as the target display area. In the above process, the area of the target display area increases.
[0038] Step S102 , in response to a change in display content of a target display area, if a triggering operation that triggers a change in display content of the target display area satisfies a triggering condition, obtaining second display data of the target display data from a graphics card.
[0039] Here, the display content of the target display area may be any suitable content, such as images, text, etc. In some embodiments, the display content of the target display area may be changed by increasing the display content of the target display area, decreasing the display content of the target display area, updating the display content of the target display area, etc.
[0040] The trigger operation refers to an operation that triggers the display content of the target display area to change. In some embodiments, the trigger operation may include but is not limited to: an operation that causes the area of the target display area to change, an interactive operation that causes the target area to change. The target area is a partial area of the target page displayed in the target display area. The operation that causes the area of the target display area to change may include but is not limited to: an interactive operation of scaling the target display area, a control operation of changing the displayable area of the display screen, etc.
[0041] Exemplarily, the display content on the display screen of the electronic device can be enlarged by spreading two fingers apart, thereby achieving an interactive operation of enlarging the target display area.
[0042] Exemplarily, when an electronic device is configured with a scroll screen, the scroll screen can be expanded or contracted to change its size by pressing a screen telescopic button, thereby realizing a control operation of changing the displayable area of the display screen.
[0043] The trigger condition is a condition for determining whether to trigger the process of obtaining the second display data of the target display data from the graphics card. There are many operations that cause the display content to change, and not all trigger operations that cause the display content to change need to execute the image generation method of the present application. Therefore, in the implementation of the present application, if the trigger operation that triggers the display content of the target display area to change meets the trigger condition, the method of the present application is executed. The trigger condition may include but is not limited to: the trigger operation is an operation that causes the area of the target display area to change, the trigger operation is an interactive operation that causes the target area to change, etc., wherein the target area is the portion of the target page displayed in the target display area.
[0044] Exemplarily, when the trigger condition includes a trigger operation that causes the area of the target display area to change, if it is detected that the trigger operation causes the area of the target display area to increase by 50%, then it is determined that the trigger operation that triggers the change in the display content of the target display area satisfies the trigger condition.
[0045] Exemplarily, when the trigger condition includes that the trigger operation is an interactive operation that causes the target area to change, if it is detected that the trigger operation is an interactive operation that causes the target area to change, then it is determined that the trigger operation that triggers the display content of the target display area to change satisfies the trigger condition.
[0046] In some embodiments, to further reduce the false trigger rate, the trigger conditions may also include, but are not limited to: the duration of the trigger operation is greater than a preset duration, the change in the displayed content is greater than a preset ratio, etc. The preset duration may be any appropriate duration, for example, 1s (second), 0.5s, etc. The preset ratio may be any appropriate size, for example, 50%, 30%, etc.
[0047] Exemplarily, when the preset duration is 1s, the duration of the trigger operation is 1.1s, which satisfies the duration of the trigger operation being greater than the preset duration, thereby determining that the trigger operation that triggers the display content of the target display area to change meets the trigger condition.
[0048] Exemplarily, when the trigger condition is that the display content changes by more than 50%, 53% of the display content of the target display area changes through the trigger operation, thereby determining that the trigger operation that triggers the display content of the target display area to change satisfies the trigger condition.
[0049] The second display data is data generated when the display content of the target display area changes. The second display data can be used to form the display content of the target display area on the display screen. In some embodiments, when the second display data is obtained, the display content of the target display area corresponding to the first display data can be formed in real time on the display screen through the second display data.
[0050] In some embodiments, the second display data may include, but is not limited to: vertex data, texture data, RGB pixel values, etc. In some embodiments, the number of the second display data may be at least one.
[0051] In some embodiments, after acquiring the first display data, in response to changes in the display content of the target display area, it is possible to continuously determine whether the trigger operation satisfies the trigger condition. When the trigger operation satisfies the trigger condition, the target operation is automatically triggered again to obtain second display data of the target display data from the graphics card based on the target operation.
[0052] In some implementations, the start time of the triggering operation that triggers the display content of the target display area to change may be acquired, and from the triggering time, the second display data of the target display data may be obtained from the graphics card.
[0053] In some implementations, the stop time of the triggering operation that triggers the display content of the target display area to change may be acquired, and from the stop time, the second display data of the target display data may be acquired from the graphics card.
[0054] Step S103, generating a first file including second display data; wherein the first display data and the second display data are used to form display content of a target display area on the display screen.
[0055] Here, the first file is the final saved image file. The method for generating the first file may include but is not limited to: generating the first file by calling a related graphics application programming interface (Application Programming Interface, API), generating the first file by calling a preset function, etc. For example, using a related graphics API, it is possible to provide applications and developers with the ability to access a set of routines based on certain software or hardware. The related graphics API can generate a first file containing the second display data. The related graphics API may include but is not limited to: OpenGL, DirectX, Vulkan, etc. For another example, the preset function can help developers complete tasks such as graphics rendering and image capture, and the first file containing the second display data can be generated by the preset function. The preset function may include but is not limited to: glDrawArrays() function, ID3D11DeviceContext::PSSetShaderResources() function, vkCmdDrawIndexed() function, etc.
[0056] In some implementations, the format of the first file may include, but is not limited to, JPEG (Joint Photographic Experts Group), TIFF (Tag Image File Format), BMP (Bitmap Image File), and the like.
[0057] In some embodiments, the first file includes attribute information, which is used to describe the basic attributes of the first file. The attribute information may include, but is not limited to: file size, resolution, display brightness, contrast, etc. The file size may be any suitable size, for example, 2.2MB (megabytes), 354KB (kilobytes), etc. Resolution refers to the number of pixels in the vertical and horizontal directions of the screen. The resolution may be any suitable size, for example, 1920×1080ppi (pixels per inch), 1280×720ppi, etc. Display brightness may be any suitable size, for example, 500 nits (nit), 385nit, etc. Contrast refers to the measurement of different brightness levels between the brightest white and the darkest black in the light and dark areas of an image. The contrast may be any suitable ratio, for example, 120:1, 300:1, etc.
[0058] In some embodiments, after the first file is generated, the first file may be saved. The method for saving the first file may include but is not limited to: saving the first file through an internal storage system, and saving the first file by uploading the first file to the cloud. The internal storage system refers to a hardware device inside a computer for storing data.
[0059] In some implementations, the first display data and the second display data may be spliced to generate the first file, or the first file may be generated directly based on the second display data.
[0060] In some implementations, when there is at least one second display data, each second display data may be spliced to obtain the first file.
[0061] In the embodiment of the present application, after the first display data of the target display area is obtained from the graphics card in response to the target operation, if the trigger operation that triggers the display content of the target display area to change satisfies the trigger condition, the second display data of the target display data is obtained from the graphics card, and then the first file containing the second display data is generated. In this way, on the one hand, it is necessary to determine whether the trigger operation satisfies the trigger condition before obtaining the second display data, which reduces the possibility of erroneous screenshots; on the other hand, after obtaining the first display data, the second display data is obtained again based on the trigger operation, and there is no need to manually trigger the screenshot again, which simplifies the operation steps and reduces the possibility of missing important pictures.
[0062] In some implementations, the triggering operation that triggers the display content of the target display area to change satisfies the triggering condition, indicating that the triggering operation is an operation that causes the area of the target display area to change.
[0063] Here, the area of the target display area can be any suitable size, for example, 5 inches, 7.5 inches, etc. In some embodiments, the target display area can be the entire area of the display screen, or a partial area of the display screen. The area of the target display area is less than or equal to the screen size of the display screen. In some embodiments, the display screen may include at least one display page, and the target display area may be one of the display pages, or may include all the display pages.
[0064] In some embodiments, since the trigger operation can cause the area of the target display area to change, the trigger operation can be used to cause the amount of displayed content to change. The area of the target display area and the amount of displayed content are positively correlated. When the area of the target display area becomes larger, the displayed content becomes more, and when the area of the target display area becomes smaller, the displayed content becomes less.
[0065] In the implementation manner of the present application, an operation that causes the area of the target display region to change is used as a trigger operation, thereby improving the pertinence of the trigger operation.
[0066] In some embodiments, the operation of changing the area of the target display area includes at least one of the following: an interactive operation of scaling the target display area; a control operation for changing the displayable area of the display screen; the target display area is a display area included in the display screen.
[0067] Here, the interactive operation of zooming the target display area may include but is not limited to: an interactive operation of reducing the target display area, an interactive operation of enlarging the target display area, etc. In some embodiments, the interactive operation of zooming the target display area may be implemented by including but not limited to the following methods: implementing the interactive operation of zooming the target display area by dragging a zoom button or slider on a toolbar, implementing the interactive operation of zooming the target display area by pinching or separating two fingers, etc.
[0068] Exemplarily, the interactive operation of reducing the target display area can be achieved by pinching two fingers together, and the interactive operation of enlarging the target display area can be achieved by spreading the two fingers apart.
[0069] Exemplarily, the interactive operation of reducing the target display area can be achieved by dragging the zoom slider of the toolbar to the left, and the interactive operation of enlarging the target display area can be achieved by dragging the zoom slider of the toolbar to the right.
[0070] The control operation for changing the displayable area of the display screen can enlarge or reduce the displayable area of the display screen. In some embodiments, the control operation for changing the displayable area of the display screen can be implemented by pressing a target button. The target button can be any suitable physical button, such as a screen telescopic button, a power button, a volume button, and the like. Exemplarily, the control operation of changing the displayable area of the display screen can be implemented by pressing the screen telescopic button. When the screen is extended, the displayable area of the display screen is enlarged, and when the screen is shrunk, the displayable area of the display screen is reduced. In some embodiments, when the triggering operation includes a control operation for changing the displayable area of the display screen, the target display area is the display area contained in the display screen.
[0071] In some implementations, the display screen may be a scroll screen, and when the screen extension is triggered, a control operation for changing the displayable area of the display screen may be triggered. The screen extension may be triggered by pressing a screen extension button.
[0072] Figure 4 A schematic diagram of a trigger operation provided in an embodiment of the present application, such as Figure 4 As shown, the trigger operation includes a control operation for changing the displayable area of the display screen, and the trigger operation can be performed by pressing the button 41.
[0073] In the implementation manner of the present application, different trigger operations are used to enrich the content of the trigger operations, improve the compatibility of the trigger operations, and thus enrich the usage scenarios of the image generation method.
[0074] In some implementations, if the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a slidable page, step S103 includes step S103a or step S103b, wherein:
[0075] Step S103a: generating a first file based on the second display data.
[0076] Here, the target page is a page displayed in the target display area. The target page displayed in the target display area is a slidable page, which means that an up and down sliding operation can be performed in the target page. In some embodiments, when the target page displayed in the target display area is a slidable page, the number of the second display data is at least one, and the generated first file is a long screenshot file. The method of generating the first file based on the second display data may include but is not limited to: generating the first file by calling a related graphics API, generating the first file by calling a preset function, etc.
[0077] In some implementations, when the first file is generated based on the second display data, the second display data may be spliced to obtain the first file.
[0078] Step S103b: splice the first display data and the second display data to generate a first file.
[0079] Here, when splicing the first display data and the second display data, it is necessary to compare the content of the first display data and the content of the second display data to ensure that the spliced first file does not have duplicate display data, thereby ensuring the accuracy and display effect of the first file.
[0080] In some embodiments, the method of comparing the content of the first display data and the content of the second display data may include, but is not limited to: comparing the content of the first display data and the content of the second display data by comparing whether the colors corresponding to the RGB pixel values are the same, comparing the content of the first display data and the content of the second display data by calculating and comparing hash values, etc. A hash value is an algorithm that maps data of any length to a fixed-length value, and converts input data into a unique hash value through a hash function, which is usually a string of numbers and letters of a fixed length.
[0081] Exemplarily, if the colors corresponding to the multiple consecutive RGB pixel values of the first display data are the same as the colors corresponding to the multiple consecutive RGB pixel values of the second display data, it is determined that the content of the first display data is the same as the content of the second display data.
[0082] Exemplarily, if the hash values corresponding to a plurality of consecutive vertex data of the first display data are the same as the hash values corresponding to a plurality of consecutive vertex data of the second display data, it is determined that the content of the first display data is the same as the content of the second display data.
[0083] The method of splicing the first display data and the second display data may include but is not limited to: splicing the first display data and the second display data through an operator, splicing the first display data and the second display data through a preset function. The operator may include but is not limited to: ||, +, &, etc. The preset function may include but is not limited to: CONCAT() function, combinedData() function, etc.
[0084] In some implementations, the first display data and the second display data are spliced to obtain spliced display data, and then a first file is generated based on the spliced display data. Methods for generating the first file based on the spliced display data may include but are not limited to: generating the first file by calling a related graphics API, generating the first file by calling a preset function, etc.
[0085] In some implementations, if the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a non-slideable page, step S103 includes step S103c, wherein:
[0086] Step S103c: generating a first file based on the second display data.
[0087] Here, in the case where the target page displayed in the target display area is a non-slideable page, the number of the second display data is one, and the generated first file is a single screenshot file.
[0088] The process of generating the first file based on the second display data may refer to the specific implementation of step S103.
[0089] In the implementation manner of the present application, during different trigger operations, the first file is generated by using the second display data or by splicing the first display data and the second display data, thereby improving the accuracy of the first file.
[0090] In some embodiments, if the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a slidable page, the method further includes step S104, the "obtaining second display data of the target display data from the graphics card" in step S101 includes step S101a, and step S103 includes step S101a, wherein:
[0091] Step S104, obtaining the triggering time of the triggering operation.
[0092] Here, the triggering time of the triggering operation refers to the initial time corresponding to the triggering operation. The triggering time of the triggering operation can be any appropriate time, for example, 13:25:16, 11:02:44, etc.
[0093] The method for obtaining the triggering time of the triggering operation may include but is not limited to: obtaining the triggering time of the triggering operation by obtaining the current timestamp, obtaining the triggering time of the triggering operation by calling a preset function, etc. For example, the Date object is used to process date and time, and the current timestamp can be obtained by using the Date object, and the timestamp is converted into the triggering time of the triggering operation. For another example, the preset function may include but is not limited to: NOW() function, System.currentTimeMillis() function, etc.
[0094] Step S101a, from the triggering moment, obtaining the second display data of the target display data from the graphics card.
[0095] Here, after the triggering moment is acquired, the triggering moment may be used as the initial moment for acquiring the second display data, and from the triggering moment on, the second display data of the target display data is acquired from the graphics card.
[0096] The process of obtaining the second display data of the target display data from the graphics card may refer to the specific implementation of step S102.
[0097] Step S101a, splicing the second display data to obtain a first file.
[0098] Here, the number of the second display data is at least one. The method of splicing the second display data may include but is not limited to: splicing the second display data through an operator, splicing the second display data through a preset function. The operator may include but is not limited to: ||, +, &, etc. The preset function may include but is not limited to: CONCAT() function, combinedData() function, etc.
[0099] In some embodiments, the target display area can be divided into three parts: upper, middle and lower parts, where the middle part is a sliding area. When performing a screenshot operation, the upper part is first captured to obtain a second display data. During the sliding operation, the middle part is captured to obtain multiple second display data. After the sliding operation is completed, the lower part is captured to obtain a second display data. Finally, the second display data are spliced to obtain a first file.
[0100] In an embodiment of the present application, when the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a slidable page, second display data is obtained from the graphics card from the moment the trigger is acquired, and each second display data is spliced to obtain the first file, thereby improving the accuracy of the second display data and the first file.
[0101] In some embodiments, the method further comprises step S105, wherein:
[0102] Step S105, starting from the triggering moment, changing the target area where the target page is displayed in the target display area according to a preset strategy.
[0103] Here, after the triggering moment is obtained, the display position of the target page in the target display area or the size of the target page is changed according to a preset strategy from the triggering moment, thereby changing the target area where the target page is displayed in the target display area.
[0104] The preset strategy may be that the electronic device automatically slides the target page to perform a long screenshot operation.
[0105] In some implementations, when the target area displayed in the target display area of the target page is changed according to a preset policy, the long screenshot operation may be stopped in response to a stop operation or reaching the bottom of the target page. The stop operation may be an operation in which the user clicks the display screen.
[0106] In some implementations, the preset strategy may also include, but is not limited to: split screen display, floating window display, etc. Split screen display refers to displaying two different pages on the same display screen at the same time, and the target area where the target page is displayed in the target display area can be changed through split screen display. Floating window display refers to a window that is displayed floatingly on the target display area, and the target page is displayed in the window.
[0107] In the implementation manner of the present application, starting from the triggering moment, the target area where the target page is displayed in the target display area is changed by a preset strategy, thereby improving the accuracy of the target page.
[0108] In some embodiments, the trigger operation includes a control operation for changing a displayable area of the display screen, the page displayed in the target display area is a slidable page, and the method further includes step S106, and the "obtaining second display data of the target display data from the graphics card" in step S101 includes step S101b, wherein:
[0109] Step S106, obtaining the stop time when the displayable area of the display screen stops changing.
[0110] Here, the stop time when the displayable area of the display screen stops changing refers to the time when the displayable area of the display screen stops changing. The stop time when the displayable area of the display screen stops changing can be any appropriate time, for example, 17:46:18, 10:32:02, etc.
[0111] In some implementations, the stop moment when the displayable area of the display screen stops changing may include, but is not limited to: the moment when the scroll screen stops expanding and contracting, the moment when the user releases the zooming operation on the page, and the like.
[0112] The method for obtaining the stop time when the displayable area of the display screen stops changing may include but is not limited to: obtaining the stop time when the displayable area of the display screen stops changing by obtaining the current timestamp, obtaining the stop time when the displayable area of the display screen stops changing by calling a preset function, etc. The preset function may include but is not limited to: NOW() function, System.currentTimeMillis() function, etc.
[0113] Step S101b, from the stop time, obtaining second display data of the target display data from the graphics card.
[0114] Here, after the stop time is acquired, the stop time may be used as the initial time for acquiring the second display data, and from the stop time, the second display data of the target display data is acquired from the graphics card.
[0115] The process of obtaining the second display data of the target display data from the graphics card may refer to the specific implementation of step S102.
[0116] In an embodiment of the present application, when the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a slidable page, the second display data is obtained from the graphics card from the acquisition stop time, thereby improving the accuracy of the second display data.
[0117] In some embodiments, the method further comprises step S107, wherein:
[0118] Step S107, starting from the stop time, changing the target area where the target page is displayed in the target display area according to a preset strategy.
[0119] Here, after the stop time is obtained, the display position of the target page in the target display area or the size of the target page is changed according to a preset strategy from the stop time, thereby changing the target area where the target page is displayed in the target display area.
[0120] The preset strategy may be that the electronic device automatically slides the target page to perform a long screenshot operation.
[0121] In some implementations, the preset strategy may also include, but is not limited to: split-screen display, floating window display, etc.
[0122] In the implementation manner of the present application, starting from the stop moment, the target area where the target page is displayed in the target display area is changed by a preset strategy, thereby improving the accuracy of the target page.
[0123] In some embodiments, the triggering operation that triggers the display content of the target display area to change satisfies the triggering condition and represents that the triggering operation is an interactive operation that causes the target area to change; wherein the target area is the portion of the target page displayed in the target display area, and the target page is slidable.
[0124] Here, the target area may be the entire area of the target display area or a partial area of the target display area. The area of the target area may be any suitable size, for example, 3.2 inches, 4.5 inches, etc. In some embodiments, the area of the target area is less than or equal to the area of the target display area.
[0125] In some implementations, when the trigger operation includes an interactive operation that causes a target area to change, the trigger operation may be an interactive operation that causes the target area to become larger, or may be an interactive operation that causes the target area to become smaller.
[0126] In the implementation manner of the present application, the interactive operation that causes the target area to change is used as a trigger operation, which improves the pertinence of the trigger operation.
[0127] In some embodiments, the method further comprises step S108 and / or step S109, wherein:
[0128] Step S108, saving the first file.
[0129] Here, the first file is an image file including the second display data. In some implementations, the first file may include only the second display data, or may include the first display data and the second display data.
[0130] The method for saving the first file may include, but is not limited to: saving the first file through an internal storage system, and saving the first file by uploading the first file to the cloud.
[0131] Step S109: Generate and save a second file based on the first display data.
[0132] Here, the second file is an image file containing the first display data. The method for generating the second file may include but is not limited to: generating the second file by calling a related graphics API, generating the second file by calling a preset function, etc. The related graphics API may include but is not limited to: OpenGL, DirectX, Vulkan, etc. The preset function may include but is not limited to: glDrawArrays() function, ID3D11DeviceContext::PSSetShaderResources() function, vkCmdDrawIndexed() function, etc.
[0133] The method for saving the second file may include, but is not limited to: saving the second file through an internal storage system, and saving the second file by uploading the second file to the cloud.
[0134] In some implementations, the format of the second file may include, but is not limited to, JPEG, TIFF, BMP, etc. The format of the second file may be the same as or different from the format of the first file.
[0135] In the implementation manner of the present application, the second file is generated by the first display data and the first file is saved or saved, so that the finally generated file can be saved. At the same time, since different files can be saved, the compatibility of the image generation method is improved.
[0136] In some embodiments, the method further includes steps S110 to S111, wherein:
[0137] Step S110, displaying the target control in the target display area.
[0138] Here, the target control is an element used for interaction in the target display area. The target control can be any suitable shape, such as a circle, a square, etc.
[0139] In some implementations, after the first file and / or the second file is generated, a target control is created, and then the property information of the target control is set according to the layout of the target page, and finally the target control is displayed according to the property information of the target control. The property information of the target control may include but is not limited to: size information, position information, style information, etc.
[0140] In some implementations, the target control may be displayed by calling a preset function according to the attribute information of the target control. The preset function may include but is not limited to: show() function, pack() function, grid() function, etc.
[0141] Figure 5 A schematic diagram of a display target control provided in an embodiment of the present application, such as Figure 5 As shown, the interface 51 is a text message interface. After the first file is generated, a thumbnail 52 of the first file is displayed on the interface 51, and a target control 53 is displayed below the thumbnail 52 of the first file.
[0142] Step S111, in response to the operation on the target control, determining the target file to be saved; wherein the target file includes the first file and / or the second file.
[0143] Here, after detecting the operation of the target control, the first file and / or the second file may be saved. The operation of the target control may include but is not limited to: double-clicking the target control, long pressing the target control, single-clicking the target control, etc.
[0144] In some implementations, the target file to be saved is determined only when the operation on the target control satisfies a preset condition. In implementation, the preset condition may be greater than a preset duration. The preset duration may be any suitable size, for example, 0.5s, 1.2s, etc.
[0145] In the implementation manner of the present application, the target file to be saved is determined by operating the target control, thereby improving the accuracy of saving the file, and the user can independently select the file to be saved, thereby improving the user experience.
[0146] The following describes the application of the image generation method provided in the embodiment of the present application in actual scenarios.
[0147] In the related art, when a user takes a screenshot, if the display content in the display area of the display screen changes, there is often a need to take a screenshot again. At this time, the user needs to take a screenshot again, which has the problem of complicated operation. At the same time, some important pictures may be missed, resulting in a poor user experience.
[0148] The embodiment of the present application provides an image generation method, after obtaining the first display data of the target display area from the graphics card in response to the target operation, if the trigger operation that triggers the display content of the target display area to change satisfies the trigger condition, the second display data of the target display data is obtained from the graphics card, and then a first file containing the second display data is generated. In this way, on the one hand, it is necessary to determine whether the trigger operation satisfies the trigger condition before obtaining the second display data, which reduces the possibility of erroneous screenshots; on the other hand, after obtaining the first display data, the second display data is obtained again based on the trigger operation, and there is no need to manually trigger the screenshot again, which simplifies the operation steps and reduces the possibility of missing important pictures.
[0149] Figure 6 A schematic diagram of an implementation process of an image generation method provided in an embodiment of the present application Figure 2 ,like Figure 6 As shown, the method includes steps S201 to S206, wherein:
[0150] Step S201, in response to a target operation, obtaining first display data of a target display area from a graphics card;
[0151] Step S202, in response to performing a control operation for changing the displayable area of the display screen, obtaining a triggering moment of the control operation for changing the displayable area of the display screen;
[0152] Step S203, when the control operation for changing the displayable area of the display screen meets the trigger condition, determine whether the target page displayed in the target display area is a slidable page, if so, proceed to step S204, otherwise, proceed to step S205;
[0153] Step S204, from the triggering moment, obtaining the second display data of the target display data from the graphics card, and splicing the first display data and the second display data to generate a first file;
[0154] Step S205, obtaining a stop time when the displayable area of the display screen stops changing, obtaining second display data of the target display data from the graphics card from the stop time, and generating a first file based on the second display data;
[0155] Step S206, saving the first file.
[0156] Here, the target operation is an operation in which the user instructs to obtain display data from the graphics card, for example, a screenshot operation of the user for the target display area. The first display data refers to the data obtained from the graphics card and displayed in the display area. The target display area refers to the area in the display screen of the electronic device that can display the display content. The second display data is the data generated when the display content of the target display area changes. The first display data and the second display data can be used to form the display content of the target display area on the display screen. The first file is the image file that is finally saved. The control operation for changing the displayable area of the display screen can enlarge or reduce the displayable area of the display screen.
[0157] The triggering time of the triggering operation refers to the initial time corresponding to the control operation for changing the displayable area of the display screen. The triggering time of the triggering operation can be any suitable time, for example, 13:25:16, 11:02:44, etc. The stopping time when the displayable area of the display screen stops changing refers to the time when the displayable area of the display screen stops changing. The stopping time when the displayable area of the display screen stops changing can be any suitable time, for example, 17:46:18, 10:32:02, etc.
[0158] Taking the scroll screen as an example, in the above process, in response to the target operation, the first display data of the target display area is obtained from the graphics card, and then, in response to pressing the screen telescopic button, the telescopic operation of the scroll screen is performed and the triggering time of the telescopic operation is obtained, and it is continuously determined whether the telescopic operation meets the triggering condition. When the telescopic operation meets the triggering condition, it is determined whether the target page displayed by the scroll screen is a slidable page. When the target page is slidable, a second screenshot operation is performed from the triggering moment, wherein the second screenshot operation is a long screenshot operation; when the display screen is not slidable, a second screenshot operation is performed from the stop moment of the telescopic operation of the scroll screen, wherein the second screenshot operation is a short screenshot operation. Finally, a first file is generated and saved according to the second display data corresponding to the second screenshot operation.
[0159] Based on the above embodiments, the present application also provides an electronic device, Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the electronic device 700 includes:
[0160] The control unit 701 is configured to obtain first display data of a target display area from a graphics card in response to a target operation; in response to a change in display content of the target display area, if a trigger operation that triggers a change in display content of the target display area satisfies a trigger condition, obtain second display data of the target display data from the graphics card; and generate a first file containing the second display data; wherein the first display data and the second display data are used to form display content of the target display area on the display screen;
[0161] The display unit 702 is used to display the first display data or the second display data; wherein the display unit includes a display screen with a variable size.
[0162] Here, the target operation is an operation in which a user instructs a graphics card to obtain display data, for example, a user's screenshot operation for a target display area. In some embodiments, the electronic device is configured with a display screen and a physical button. The physical button may be any suitable button, for example, a power button, a volume button, etc. In implementation, the response target operation may be the display screen responding to receiving a gesture operation. The gesture operation may include, but is not limited to: sliding down with three fingers, drawing a circle, long pressing, dragging, etc. The response target operation may also be a physical button responding to receiving a press operation.
[0163] In some embodiments, the graphics card includes at least one display data, the at least one display data is generated in response to at least one target operation, and the at least one display data can be used to form display content of a target display area on a display screen.
[0164] The first display data may include, but is not limited to: vertex data, texture data, RGB pixel values, etc. The first display data may be used to form display content of a target display area on a display screen.
[0165] The display content of the target display area may be any appropriate content, such as images, texts, etc.
[0166] The trigger operation may include, but is not limited to: an operation that changes the area of the target display area, an interactive operation that changes the target area. The target area is a partial area of the target page displayed in the target display area. The operation that changes the area of the target display area may include, but is not limited to: an interactive operation that scales the target display area, a control operation that changes the displayable area of the display screen, etc.
[0167] The trigger condition is a condition for determining whether to trigger the process of obtaining the second display data of the target display data from the graphics card. The trigger condition may include but is not limited to: the trigger operation is an operation that causes the area of the target display area to change, the trigger operation is an interactive operation that causes the target area to change, etc., wherein the target area is the portion of the target page displayed in the target display area.
[0168] The second display data may be used to form display content of the target display area on the display screen. The second display data may include, but is not limited to: vertex data, texture data, RGB pixel values, etc. In some embodiments, the number of the second display data may be at least one.
[0169] The method for generating the first file may include but is not limited to: generating the first file by calling a related graphics API, generating the first file by calling a preset function, etc. The preset function may include but is not limited to: glDrawArrays() function, ID3D11DeviceContext::PSSetShaderResources() function, vkCmdDrawIndexed() function, etc.
[0170] In the implementation of the present application, after the electronic device obtains the first display data of the target display area from the graphics card in response to the target operation, if the trigger operation that triggers the display content of the target display area to change satisfies the trigger condition, the second display data of the target display data is obtained from the graphics card, and then a first file containing the second display data is generated. In this way, on the one hand, the electronic device needs to determine whether the trigger operation satisfies the trigger condition before obtaining the second display data, which reduces the possibility of erroneous screenshots; on the other hand, after obtaining the first display data, the electronic device obtains the second display data again based on the trigger operation, and there is no need to manually trigger the screenshot again, which simplifies the operation steps and reduces the possibility of missing important pictures.
[0171] In some implementations, the triggering operation that triggers the display content of the target display area to change satisfies the triggering condition, indicating that the triggering operation is an operation that causes the area of the target display area to change.
[0172] In some embodiments, the operation of changing the area of the target display area includes at least one of the following: an interactive operation of scaling the target display area; a control operation for changing the displayable area of the display screen; the target display area is a display area included in the display screen.
[0173] In some embodiments, if the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a slidable page, the control unit 701 is also used to generate a first file based on the second display data; or, to splice the first display data and the second display data to generate the first file.
[0174] In some embodiments, the trigger operation includes a control operation for changing the displayable area of the display screen, the target page displayed in the target display area is a slidable page, and the control unit 701 is also used to obtain the triggering moment of the triggering operation; from the triggering moment, the second display data of the target display data is obtained from the graphics card; and each second display data is spliced to obtain the first file.
[0175] In some implementations, the control unit 701 is further configured to change the target area where the target page is displayed in the target display area according to a preset strategy starting from the triggering moment.
[0176] In some embodiments, the trigger operation includes a control operation for changing the displayable area of a display screen, the page displayed in the target display area is a slidable page, and the control unit 701 is further used to obtain the stop moment when the displayable area of the display screen stops changing; from the stop moment, the second display data of the target display data is obtained from the graphics card.
[0177] In some implementations, the control unit 701 is further configured to change the target area where the target page is displayed in the target display area according to a preset strategy starting from the stop moment.
[0178] In some embodiments, the triggering operation that triggers the display content of the target display area to change satisfies the triggering condition and represents that the triggering operation is an interactive operation that causes the target area to change; wherein the target area is the portion of the target page displayed in the target display area, and the target page is slidable.
[0179] In some implementations, the control unit 701 is further configured to save the first file; and / or generate and save the second file based on the first display data.
[0180] In some embodiments, the electronic device includes a driving device, a processing device, and a display device.
[0181] The display device, wherein the area capable of displaying output includes a deformation area for displaying first display data and second display data, wherein the deformation area has a first orientation and a second orientation, and the first orientation is different from the second orientation.
[0182] The driving device is used to control the deformation area to change so that the displayable area of the display device changes.
[0183] The processing device is used to obtain first display data displayed by the display device from the graphics card in response to the target operation; obtain second display data displayed by the display device from the graphics card in response to the driving device controlling the change of the area of the display device used for displaying output; and generate a first file containing the second display data; wherein the first display data and the second display data are used to form display content on the display device.
[0184] In some embodiments, the display device of the electronic device is a scroll screen, and correspondingly, the display unit may be a scroll screen. Figure 8 A hardware entity diagram of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, the electronic device 800 includes: a processor 801, a communication interface 802, a memory 803 and a scroll screen 804, wherein:
[0185] The processor 801 generally controls the overall operation of the electronic device 800, and can be used to respond to a target operation to obtain first display data of a target display area from a graphics card; in response to a change in display content of the target display area, if a triggering operation that triggers a change in display content of the target display area meets a triggering condition, obtain second display data of the target display data from the graphics card; generate a first file containing the second display data; wherein the first display data and the second display data are used to form the display content of the target display area on the scroll screen 804.
[0186] The communication interface 802 may enable the electronic device 800 to communicate with other terminals or servers via a network.
[0187] The memory 803 includes a graphics card, and is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by the processor 801 and each module in the electronic device 800 (for example, the first display data and the second display data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data can be transmitted between the processor 801, the communication interface 802, the memory 803 and the scroll screen 804 through the bus 805.
[0188] The scroll screen 804 is used to display image data corresponding to the first display data or image data corresponding to the second display data; wherein the size of the scroll screen 804 is variable.
[0189] In some embodiments, the size of the scroll screen 804 is variable, which means that the size of the scroll screen 804 can be enlarged or reduced. When the scroll screen 804 is extended, the size of the scroll screen 804 is enlarged, and when the scroll screen 804 is shortened, the size of the scroll screen 804 is shortened. The displayable area of the scroll screen 804 can be increased by extending the scroll screen 804, and the displayable area of the scroll screen 804 can be reduced by shortening the scroll screen 804.
[0190] In some implementations, the electronic device 800 further includes a screen retracting button, and the scroll screen 804 can be retracted or extended by pressing the screen retracting button, thereby changing the size of the scroll screen 804 .
[0191] In some embodiments, when the retractable scroll screen 804 is triggered by pressing the screen retract button, the screen retract button can be pressed again to trigger the stop of retracting the scroll screen 804, or the retractable scroll screen 804 can be automatically triggered to stop when the scroll screen 804 reaches the maximum or minimum size.
[0192] The description of the electronic device embodiment above is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the electronic device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0193] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.
[0194] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0195] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above method when executing the computer program.
[0196] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the above method when executed by a processor. The computer-readable storage medium may be transient or non-transient.
[0197] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
[0198] It should be noted that Fig. 9 A schematic diagram of a hardware entity of a terminal device provided in an embodiment of the present application is shown in the figure. As shown in the figure, the hardware entity of the terminal device 900 includes: a processor 901, a communication interface 902 and a memory 903, wherein:
[0199] The processor 901 generally controls the overall operation of the terminal device 900 .
[0200] The communication interface 902 enables the terminal device 900 to communicate with other terminals or servers through a network.
[0201] The memory 903 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or processed by the processor 901 and each module in the terminal device 900 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be performed between the processor 901, the communication interface 902, and the memory 903 through the bus 904.
[0202] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0203] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0204] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0205] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0206] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0207] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0208] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memories, magnetic disks or optical disks.
[0209] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0210] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for generating an image, include: In response to the target operation, obtaining first display data of the target display area from the graphics card; In response to a change in display content of the target display area, if a triggering operation triggering the change in display content of the target display area satisfies a triggering condition, obtaining second display data of the target display data from the graphics card; A first file including the second display data is generated; wherein the first display data and the second display data are used to form display content of the target display area on the display screen.
2. The method according to claim 1, in: The triggering operation that triggers the display content of the target display area to change satisfies the triggering condition, which indicates that the triggering operation is an operation that causes the area of the target display area to change.
3. The method according to claim 2, wherein the operation of changing the area of the target display area comprises at least one of the following: An interactive operation of scaling the target display area; A control operation for changing the displayable area of a display screen; the target display area is the display area included in the display screen.
4. The method according to claim 3, if the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a slidable page, the generating of the first file containing the second display data, include: generating the first file based on the second display data; or splicing the first display data and the second display data to generate the first file; If the trigger operation includes a control operation for changing the displayable area of the display screen and the target page displayed in the target display area is a non-slideable page, generating a first file including the second display data includes: The first file is generated based on the second display data.
5. The method according to claim 4, wherein the trigger operation comprises a control operation for changing the displayable area of the display screen, the target page displayed in the target display area is a slidable page, and the method further comprises: include: Obtaining a triggering time of the triggering operation; The step of obtaining the second display data of the target display data from the graphics card comprises: From the triggering moment, obtaining second display data of the target display data from the graphics card; The generating of the first file including the second display data comprises: The second display data are spliced to obtain the first file.
6. The method according to claim 5, further comprising: include: From the triggering moment, the target area where the target page is displayed in the target display area is changed according to a preset strategy.
7. The method according to claim 4, wherein the trigger operation comprises a control operation for changing the displayable area of the display screen, the page displayed in the target display area is a slidable page, and the method further comprises: include: Obtaining a stop time when the displayable area of the display screen stops changing; The step of obtaining the second display data of the target display data from the graphics card comprises: From the stopping time, second display data of the target display data is obtained from the graphics card.
8. The method according to claim 7, further comprising: include: From the stop time, the target area where the target page is displayed in the target display area is changed according to a preset strategy.
9. The method according to claim 1, in: The triggering operation that triggers the display content of the target display area to change satisfies the triggering condition, indicating that the triggering operation is an interactive operation that causes the target area to change; wherein, the target area is the portion of the target page displayed in the target display area, and the target page is slidable.
10. The method according to any one of claims 1 to 9, further comprising one of the following combinations: saving the first file; A second file is generated based on the first display data and saved.
