Image rendering method, device and storage medium
By using the animation rendering module in the template editor to determine and render the animation frame attributes, the problem that the template editor cannot effectively export video data in the prior art is solved, and the intelligence is improved when acquiring video data.
Patent Information
- Application Number
- CN202210450108.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-04-26
AI Technical Summary
When the existing template editor processes video data, it is unable to effectively export video data, resulting in a decrease in intelligence when acquiring video data.
The animation data is transmitted to the animation rendering module through the layer rendering interface. The animation rendering module uses the animation rendering module to determine the animation frame attributes based on the preset frame information, and render these attributes into the animation data to generate rendering data to obtain the animation data.
The intelligence of using the template editor to obtain video data is improved, so that each frame of the animation data corresponds to different animation frame attributes, and the animation data can be obtained from the template editor more intelligently.
Smart Images

Figure CN114782579B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of dynamic image processing, and in particular to an image rendering method and device, and a storage medium. Background Art
[0002] In the prior art, a template editor is usually used to render the received image data and then display the image data. Since the content rendered by the template editor is a static resource, that is, a frame of data in the video, when the template editor is used to render the video data, the template editor also renders the video data into a frame of data, making it impossible to export the video data using the template editor, thereby reducing the intelligence when using the template editor to obtain video data. Summary of the invention
[0003] In order to solve the above-mentioned technical problems, the embodiments of the present application hope to provide an image rendering method and device, and a storage medium, which can improve the intelligence when obtaining video data using a template editor.
[0004] The technical solution of this application is implemented as follows:
[0005] The present application provides an image rendering method, the image rendering method comprising:
[0006] When receiving the animated image data, transmitting the animated image data to the animated image rendering module through the layer rendering interface;
[0007] Determine the dynamic effect frame attribute corresponding to the dynamic image data according to the preset frame information by using the dynamic image rendering module;
[0008] The motion effect frame attributes are rendered into the dynamic image data to obtain rendering data, so as to obtain the dynamic image data from the rendering data according to the motion effect frame attributes.
[0009] The present application provides an image rendering device, the device comprising:
[0010] A transmission unit, configured to transmit the dynamic image data to a dynamic image rendering module through a layer rendering interface when the dynamic image data is received;
[0011] A determination unit, configured to determine the motion effect frame attributes corresponding to the motion picture data according to preset frame information by using the motion picture rendering module;
[0012] A rendering unit is used to render the motion effect frame attributes into the dynamic image data to obtain rendering data, so as to obtain the dynamic image data from the rendering data according to the motion effect frame attributes.
[0013] The present application provides an image rendering device, the device comprising:
[0014] A memory, a processor and a communication bus, wherein the memory communicates with the processor via the communication bus, and the memory stores an image rendering program executable by the processor. When the image rendering program is executed, the image rendering method described above is executed by the processor.
[0015] An embodiment of the present application provides a storage medium having a computer program stored thereon, which is applied to an image rendering device, and is characterized in that when the computer program is executed by a processor, the above-mentioned image rendering method is implemented.
[0016] The embodiments of the present application provide an image rendering method and device, and a storage medium. The image rendering method includes: when receiving animated image data, transmitting the animated image data to a animated image rendering module through a layer rendering interface; using the animated image rendering module to determine the motion effect frame attributes corresponding to the animated image data according to preset frame information; rendering the motion effect frame attributes into the animated image data to obtain rendering data, so as to obtain the animated image data from the rendering data according to the motion effect frame attributes. Using the above method implementation scheme, the image rendering device uses the animated image rendering module to determine the motion effect frame attributes corresponding to the animated image data, and renders the motion effect frame attributes into the animated image data to obtain rendering data, so that each frame data in the animated image data corresponds to different motion effect frame attributes, and the animated image rendering device can obtain the corresponding animated image data from the template editor according to the motion effect frame attributes, thereby improving the intelligence when using the template editor to obtain animated image data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flow chart of an image rendering method provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of an exemplary template editor provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a connection between an exemplary image rendering module and a template editor provided in an embodiment of the present application;
[0020] Figure 4 An exemplary editor rendering example provided for an embodiment of the present application Figure 1 ;
[0021] Figure 5 An exemplary editor rendering example provided for an embodiment of the present application Figure 2 ;
[0022] Figure 6 An exemplary editor rendering example provided for an embodiment of the present application Figure 3 ;
[0023] Figure 7 An exemplary image rendering execution flow chart provided for an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the composition structure of an image rendering device provided in an embodiment of the present application Figure 1 ;
[0025] Fig. 9 A schematic diagram of the composition structure of an image rendering device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0027] The present application embodiment provides an image rendering method, which is applied to an image rendering device. Figure 1 A flowchart of an image rendering method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the image rendering method may include:
[0028] S101. When receiving animated image data, transmit the animated image data to a animated image rendering module through a layer rendering interface.
[0029] An image rendering method provided in an embodiment of the present application is suitable for a scenario in which animated image data is rendered.
[0030] In the embodiments of the present application, the image rendering device can be implemented in various forms. For example, the image rendering device described in the present application can include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.
[0031] In the embodiment of the present application, the animated image data may be video data; the animated image data may also be media data; the animated image data may also be other data. The specific animated image data may be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0032] In an embodiment of the present application, the image rendering device includes a template editor and a dynamic image rendering module. The template editor is used to receive dynamic image data and transmit the dynamic image data to the dynamic image rendering module through a layer rendering interface on the template editor; the dynamic image rendering module is used to determine the motion frame attributes corresponding to the dynamic image data, and then transmit the rendered dynamic image data (rendering data) to the template editor through the layer rendering interface, so as to display the rendering data using a view container in the template editor.
[0033] In an embodiment of the present application, the layer rendering interface can be a custom layer renderer, that is, a custom layer renderer is set on the template editor, so that when the template editor receives dynamic image data, the dynamic image data is transmitted to the dynamic image rendering module through the custom layer renderer on the template editor.
[0034] It should be noted that the layer rendering interface can also be other data transmission interfaces for transmitting dynamic image data to the dynamic image rendering module. The specific interface can be determined according to actual conditions, and the embodiments of the present application do not limit this.
[0035] In an embodiment of the present application, the process of an image rendering device transmitting dynamic image data to a dynamic image rendering module through a layer rendering interface includes: the image rendering device uses a layer rendering adapter to detect whether the dynamic image data carries attribute information of the layer rendering interface; when the image rendering device determines that the dynamic image data carries attribute information, the image rendering device transmits the dynamic image data to the dynamic image rendering module through the layer rendering interface.
[0036] In an embodiment of the present application, the attribute information may be identification information of the layer rendering interface; the attribute information may also be name information of the layer rendering interface; the attribute information may also be other information of the layer rendering interface; the specific attribute information may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0037] In an embodiment of the present application, before the image rendering device transmits the dynamic image data to the dynamic image rendering module through the layer rendering interface, the image rendering device establishes the dynamic image rendering module when receiving a trigger instruction of the rendering trigger.
[0038] In the embodiments of the present application, Figure 2The template editor (editor) in the image rendering device shown includes: a layer data set, a layer rendering data set, a context, a renderer, a layer rendering adapter, a view container, a custom layer renderer (layer rendering interface) and a rendering trigger. When the template editor receives the template data (animated image data), it uses the layer rendering adapter to detect whether the animated image data carries the attribute information of the layer rendering interface; when the image rendering device determines that the animated image data carries the attribute information, the image rendering device divides the animated image data into a layer data set and a layer rendering data set, and transmits the layer data and layer rendering data corresponding to each layer in the animated image data to the animated image rendering module in sequence through the layer rendering interface, so as to use the animated image rendering module to render the data of each layer respectively, thereby obtaining the rendering data, so as to obtain the animated image data from the rendering data according to the dynamic effect frame attributes. The view container is used to display the rendering data; the context is used to store the setting information corresponding to the template editor and the data environment of the template editor; the renderer is used to render the static elements according to the setting information or data environment in the context; the rendering trigger is used to establish the animated image rendering module when receiving the trigger instruction.
[0039] S102: Determine the dynamic effect frame attributes corresponding to the dynamic image data according to preset frame information using a dynamic image rendering module.
[0040] In an embodiment of the present application, after the image rendering device transmits the animated image data to the animated image rendering module through the layer rendering interface, the image rendering device can use the animated image rendering module to determine the dynamic effect frame attributes corresponding to the animated image data according to preset frame information.
[0041] In an embodiment of the present application, the preset frame information may be frame information configured in the image rendering device; the preset frame information may also be frame information transmitted by other devices and received by the image rendering device; the specific way in which the image rendering device obtains the preset frame information may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0042] It should be noted that the animation frame attribute may be an animation attribute that identifies each frame image in the animation data; illustratively, the animation frame attribute is frame information corresponding to each frame image in the animation data.
[0043] In an embodiment of the present application, the process of an image rendering device using a dynamic image rendering module to determine the dynamic effect frame attributes corresponding to the dynamic image data according to preset frame information includes: the image rendering device uses the dynamic image rendering module to obtain the target transition frame in the dynamic image data according to the preset frame information; the image rendering device determines the dynamic effect frame attributes according to the preset frame information and the preset frame information.
[0044] In an embodiment of the present application, the process of an image rendering device using a dynamic image rendering module to obtain a target transition frame in dynamic image data according to preset frame information includes: the image rendering device obtains layer data in the dynamic image data; and obtains at least one transition frame in the layer data; the image rendering device obtains a target transition frame that matches the preset frame information in at least one transition frame.
[0045] In an embodiment of the present application, the image rendering device further includes a frame selector, and the image rendering device can use the frame selector to obtain a target transition frame that matches preset frame information in at least one transition frame.
[0046] In an embodiment of the present application, the layer data includes a frame list, each item in the frame list represents a transition frame, and each item includes a start frame, an end frame, a start frame attribute, and a receiving frame attribute. For example, as shown in Table 1: the transition frame a with layer ID 1 corresponds to a start frame 1, an end frame 3, and start frame attributes of opacity=100, rotate=0, and end frame attributes of opacity=50, rotate=90; the transition frame b with layer ID 1 corresponds to a start frame 2, an end frame 4, a start frame attribute of scale=1, and an end frame attribute of scale=2; the transition frame c with layer ID 2 also corresponds to a start frame, an end frame, a start frame attribute, and an end frame attribute.
[0047] Table 1
[0048]
[0049] It should be noted that the process of the frame selector obtaining the target transition frame matching the preset frame information in at least one transition frame can be that the frame selector searches for at least one transition frame in the layer data. Taking the data of the layer ID 1 in Table 2 (corresponding to a width of 100, a height of 100, and coordinates of 100,100) and the frame list of layer 1 in Table 1 as an example, when the preset frame information is 2, the transition frames of the target transition frame matching the preset frame information are a and b. When the preset frame information is 4, the transition frame of the target transition frame matching the preset frame information is a.
[0050] Table 2
[0051] Layer ID width high coordinate 1 100 100 100,100 2 … … …
[0052] In an embodiment of the present application, the process of an image rendering device determining the properties of a motion effect frame based on preset frame information and preset frame information includes: the image rendering device obtains a start frame, start frame property information of the start frame, an end frame, and end frame property information of the end frame from a target transition frame; the image rendering device determines the ratio information of the preset frame information between the start frame and the end frame; the image rendering device determines the properties of the motion effect frame based on the ratio information, the start frame property information, and the end frame property information.
[0053] Exemplarily, the starting frame is 1, the ending frame is 3, the starting frame attribute information is transparency = 100, rotation angle = 0, the ending frame attribute information is transparency = 50, and end angle = 90. When the preset frame information is 2, the ratio information of the preset frame information between the starting frame and the ending frame is 1:1, which can be converted into a proportional coefficient of 0.5. The transparency corresponding to the preset frame information is 0.5*(100+50), which is 75, and the rotation degree corresponding to the preset frame information is 0.5*(0+90), which is 45. The animation frame attributes include: transparency of 75, and rotation angle of 45.
[0054] In an embodiment of the present application, the image rendering device may also use other methods to determine the animation frame attributes based on preset frame information, start frame, end frame, start frame attribute information and end frame attribute information; the specific method may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0055] In an embodiment of the present application, the dynamic image rendering module also includes a motion effect calculator. The image rendering device can use the motion effect calculator in the dynamic image rendering module to determine the ratio information of the preset frame information between the start frame and the end frame; and then use the motion effect calculator to determine the motion effect frame attributes based on the ratio information, the start frame attribute information and the end frame attribute information.
[0056] In an embodiment of the present application, before the image rendering device uses the dynamic image rendering module to determine the dynamic effect frame attributes corresponding to the dynamic image data according to the preset frame information, the image rendering device also receives the preset frame information.
[0057] In an embodiment of the present application, the dynamic image rendering module also includes a frame controller, and the image rendering device can use the frame controller to receive preset frame information.
[0058] S103: Render the motion effect frame attributes into the dynamic image data to obtain rendering data, so as to obtain the dynamic image data from the rendering data according to the motion effect frame attributes.
[0059] In an embodiment of the present application, after the image rendering device uses the dynamic image rendering module to determine the motion effect frame attributes corresponding to the dynamic image data according to the preset frame information, the image rendering device can render the motion effect frame attributes into the dynamic image data to obtain the rendering data, so as to obtain the dynamic image data from the rendering data according to the motion effect frame attributes.
[0060] In an embodiment of the present application, an image rendering device renders motion effect frame attributes into the dynamic image data to obtain a process of rendering data, including: the image rendering device renders the layer data in the dynamic image data to obtain an initial container; the image rendering device renders the layer rendering data in the dynamic image data into the initial container to obtain a rendering container; the image rendering device adds the motion effect frame attributes to the rendering container to obtain rendering data.
[0061] In an embodiment of the present application, the dynamic image rendering module also includes a dynamic image renderer. The image rendering device can use the dynamic image renderer to render the layer data in the dynamic image data to obtain an initial container; then use the dynamic image renderer to render the layer rendering data in the dynamic image data into the initial container to obtain a rendering container; finally, use the dynamic image renderer to add the dynamic effect frame attributes to the rendering container to obtain rendering data.
[0062] In the embodiment of the present application, the initial container is a container with specified width and height coordinates.
[0063] It should be noted that the style of the container will affect the style of the container content. For example, when the transparency of the container is 50%, if the transparency of the container content is also 50%, the actual effect is 25%. This logic is common in graphics rendering and belongs to the existing basic functions. It will not be described in detail here.
[0064] In an embodiment of the present application, the image rendering device adds the motion frame attributes to the rendering container. After obtaining the rendering data, the image rendering device can use the view container to display the rendering data.
[0065] In the embodiment of the present application, the dynamic image rendering module in the image rendering device is as follows: Figure 3As shown, when the image rendering device detects that the rendering trigger is triggered, the image rendering device generates a dynamic image rendering module, which includes five components: dynamic image context (context), frame controller, dynamic image renderer, frame selector, and dynamic effect calculator. Among them, the dynamic image context is used to store the data required by the dynamic image rendering module, including preset frame information and layer data (data obtained from template data); the frame controller is used to store the preset frame information (number of frames) transmitted externally in the dynamic image context, and then trigger the rendering trigger. The frame selector is used to obtain the layer data of the dynamic image context, and obtain the frame list (at least one transition frame) in the layer data. Each item in the list represents a transition frame, and each item includes a start frame and an end frame, and also includes multiple start frame attribute information and end frame attribute information. After obtaining the frame list, the frame selector simultaneously obtains the preset frame information in the dynamic image context, and obtains the target transition frame matching the preset frame information in at least one transition frame. The dynamic effect calculator is used to receive the target transition frame, and determine the dynamic effect frame attribute through the preset frame information of the dynamic image context. The animated image renderer is used to receive layer rendering data (data obtained from template data) and layer data. The animated image renderer stores the layer data in the animated image context and executes the frame selector. The frame selector is used to determine the target transition frame. The animation calculator is used to obtain the animation frame properties based on the target transition frame and the layer data in the animated image context. The animated image renderer renders an initial container of specified width, height, and coordinates based on the layer data, and renders the layer rendering data into the initial container to obtain a rendering container. Finally, the animation frame properties are set to the rendering container to obtain the rendering data, and then the rendering data is sent to the template editor (editor) through the layer rendering interface (custom layer renderer). The template editor is used to display the rendering data.
[0066] It should be noted that the frame controller is only responsible for triggering after the preset frame information changes.
[0067] For example, the rendering result of Table 2 without animated image rendering is as follows: Figure 4 As shown: an image with a width of 100 and a height of 100 is displayed at the coordinate position 100,100. After adding the dynamic image rendering, the data of the transition frames a and b in Table 1 are taken as an example. The rendering data of the second frame is as follows Figure 5 As shown: Displays an image with a transparency of 75 and a rotation angle of 45. The rendering data of the third frame is as follows Figure 6 Shown: Displays an image with transparency = 50, rotation angle = 90, and zoomed in 1.5 times.
[0068] In the embodiments of the present application, Figure 7As shown, the image rendering device sets template data on the calling side and creates a template editor, which includes a rendering trigger. When the image rendering device receives the trigger instruction of the rendering trigger, it establishes a dynamic image rendering module. The layer rendering interface (custom renderer) of the template editor is set on the calling side. The image rendering device uses a frame controller to receive preset frame information (number of frames), sets the preset frame information to the dynamic image context (context), and then the rendering trigger is triggered. The rendering trigger notifies the template editor to render (notify the editor to render). When the template editor receives the dynamic image data, it uses a layer rendering adapter to detect whether the dynamic image data carries the attribute information of the layer rendering interface; when it is determined that the dynamic image data carries the attribute information, the dynamic image data is transmitted to the dynamic image renderer of the dynamic image rendering module through the layer rendering interface (call); the dynamic image renderer sets the layer data in the dynamic image data to the context, and the frame selector obtains the layer data in the dynamic image data from the context; and obtains at least one transition frame in the layer data (obtains the transition frame); obtains the target transition frame matching the preset frame information in at least one transition frame. The motion effect calculator is used to receive the target transition frame, obtain the start frame, the start frame attribute information of the start frame, the end frame and the end frame attribute information of the end frame from the target transition frame; determine the ratio information of the preset frame information between the start frame and the end frame; determine the motion effect frame attributes according to the ratio information, the start frame attribute information and the end frame attribute information; render an initial container according to the layer data in the dynamic image data; render the layer rendering data in the dynamic image data into the initial container to obtain a rendering container; add the motion effect frame attributes to the rendering container to obtain a target container, and return the target container (rendering content) to the template editor to determine the corresponding relationship according to the target container, and obtain the dynamic image data according to the corresponding relationship.
[0069] It can be understood that the image rendering device uses the dynamic image rendering module to determine the motion frame attributes corresponding to the dynamic image data, and renders the motion frame attributes into the dynamic image data to obtain rendering data, so that each frame data in the dynamic image data corresponds to different motion frame attributes. The dynamic image rendering device can obtain the corresponding dynamic image data from the template editor according to the motion frame attributes, thereby improving the intelligence when using the template editor to obtain dynamic image data.
[0070] Based on the same inventive concept of the first embodiment, the embodiment of the present application provides an image rendering device 1, corresponding to an image rendering method; Figure 8 A schematic diagram of the composition structure of an image rendering device provided in an embodiment of the present application Figure 1 , the image rendering device 1 may include:
[0071] The transmission unit 11 is used to transmit the dynamic image data to the dynamic image rendering module through the layer rendering interface when the dynamic image data is received;
[0072] A determination unit 12, configured to determine the dynamic effect frame attributes corresponding to the dynamic image data according to preset frame information by using the dynamic image rendering module;
[0073] The rendering unit 13 is used to render the motion effect frame attributes into the dynamic image data to obtain rendering data, so as to obtain the dynamic image data from the rendering data according to the motion effect frame attributes.
[0074] In some embodiments of the present application, the apparatus further includes an acquisition unit;
[0075] The acquisition unit is used to acquire a target transition frame in the dynamic image data according to the preset frame information by using the dynamic image rendering module;
[0076] The determining unit 12 is used to determine the animation frame attributes according to the preset frame information and the preset frame information.
[0077] In some embodiments of the present application, the acquisition unit is used to acquire a start frame, start frame attribute information of the start frame, an end frame, and end frame attribute information of the end frame from the target transition frame;
[0078] The determining unit 12 is used to determine the ratio information of the preset frame information between the start frame and the end frame; and determine the properties of the motion effect frame according to the ratio information, the start frame property information and the end frame property information.
[0079] In some embodiments of the present application, the acquisition unit is used to acquire layer data in the animated image data; and acquire at least one transition frame in the layer data; and acquire a target transition frame that matches the preset frame information in the at least one transition frame.
[0080] In some embodiments of the present application, the device further includes a receiving unit;
[0081] The receiving unit is used to receive preset frame information.
[0082] In some embodiments of the present application, the device further comprises an adding unit;
[0083] The rendering unit 13 is used to render the layer data in the dynamic image data to obtain an initial container; render the layer rendering data in the dynamic image data into the initial container to obtain a rendering container;
[0084] The adding unit is used to add the motion effect frame attribute to the rendering container to obtain the rendering data.
[0085] In some embodiments of the present application, the device further comprises a display unit;
[0086] The display unit is used to display the rendering data using a view container.
[0087] In some embodiments of the present application, the device further comprises a detection unit;
[0088] The detection unit is used to detect whether the animated image data carries the attribute information of the layer rendering interface by using the layer rendering adapter;
[0089] The transmission unit 11 is used to transmit the dynamic image data to the dynamic image rendering module through the layer rendering interface when it is determined that the dynamic image data carries the attribute information.
[0090] In some embodiments of the present application, the apparatus further comprises an establishing unit;
[0091] The establishing unit is used to establish the dynamic image rendering module when a trigger instruction of a rendering trigger is received.
[0092] It should be noted that, in actual applications, the above-mentioned transmission unit 11, determination unit 12 and rendering unit 13 can be implemented by a processor 14 on the image rendering device 1, specifically a CPU (Central Processing Unit), MPU (Microprocessor Unit), DSP (Digital Signal Processing) or a field programmable gate array (FPGA); the above-mentioned data storage can be implemented by a memory 15 on the image rendering device 1.
[0093] The present application embodiment also provides an image rendering device 1, such as Fig. 9 As shown, the image rendering device 1 includes: a processor 14, a memory 15 and a communication bus 16. The memory 15 communicates with the processor 14 via the communication bus 16. The memory 15 stores a program executable by the processor 14. When the program is executed, the image rendering method described above is executed by the processor 14.
[0094] In practical applications, the memory 15 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 14.
[0095] An embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the processor 14, the image rendering method as described above is implemented.
[0096] It can be understood that the image rendering device uses the dynamic image rendering module to determine the motion frame attributes corresponding to the dynamic image data, and renders the motion frame attributes into the dynamic image data to obtain rendering data, so that each frame data in the dynamic image data corresponds to different motion frame attributes. The dynamic image rendering device can obtain the corresponding dynamic image data from the template editor according to the motion frame attributes, thereby improving the intelligence when using the template editor to obtain dynamic image data.
[0097] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0098] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0101] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An image rendering method, characterized in that: The method comprises: When receiving the animated image data, transmitting the animated image data to the animated image rendering module through the layer rendering interface; Determine the dynamic effect frame attribute corresponding to the dynamic image data according to the preset frame information by using the dynamic image rendering module; Rendering the motion effect frame attributes into the dynamic image data to obtain rendering data, so as to obtain the dynamic image data from the rendering data according to the motion effect frame attributes; Wherein, the step of using the dynamic image rendering module to determine the dynamic effect frame attributes corresponding to the dynamic image data according to preset frame information includes: Utilizing the dynamic image rendering module to obtain a target transition frame in the dynamic image data according to the preset frame information; The animation frame attribute is determined according to the target transition frame and the preset frame information.
2. The method according to claim 1, characterized in that: The determining the properties of the motion effect frame according to the target transition frame and the preset frame information includes: Acquire a start frame, start frame attribute information of the start frame, an end frame, and end frame attribute information of the end frame from the target transition frame; Determine ratio information of the preset frame information between the start frame and the end frame; The animation frame attribute is determined according to the ratio information, the start frame attribute information and the end frame attribute information.
3. The method according to claim 1, characterized in that The obtaining a target transition frame in the dynamic image data according to the preset frame information by using the dynamic image rendering module includes: Acquire layer data in the animated image data; and acquire at least one transition frame in the layer data; A target transition frame matching the preset frame information is obtained from the at least one transition frame.
4. The method according to claim 1, characterized in that: Before using the dynamic image rendering module to determine the dynamic effect frame attributes corresponding to the dynamic image data according to preset frame information, the method further includes: Receive preset frame information.
5. The method according to claim 1, characterized in that: The step of rendering the animation frame attributes into the animation data to obtain rendering data includes: Rendering the layer data in the animated image data to obtain an initial container; Rendering the layer rendering data in the animated image data into the initial container to obtain a rendering container; The motion effect frame attributes are added to the rendering container to obtain the rendering data.
6. The method according to claim 5, characterized in that After adding the motion effect frame attribute to the rendering container and obtaining the rendering data, the method further includes: The rendering data is displayed using a view container.
7. The method according to claim 1, characterized in that The transmitting the animated image data to the animated image rendering module through the layer rendering interface includes: Using a layer rendering adapter to detect whether the animated image data carries attribute information of a layer rendering interface; When it is determined that the dynamic image data carries the attribute information, the dynamic image data is transmitted to a dynamic image rendering module through a layer rendering interface.
8. The method according to claim 1, characterized in that Before transmitting the animated image data to the animated image rendering module through the layer rendering interface, the method further includes: When a trigger instruction of a rendering trigger is received, the dynamic image rendering module is established.
9. An image rendering device, characterized in that: The device comprises: A transmission unit, configured to transmit the dynamic image data to a dynamic image rendering module through a layer rendering interface when the dynamic image data is received; A determination unit, configured to determine the motion effect frame attributes corresponding to the motion picture data according to preset frame information by using the motion picture rendering module; A rendering unit, used for rendering the motion effect frame attributes into the motion picture data to obtain rendering data, so as to obtain the motion picture data from the rendering data according to the motion effect frame attributes; An acquisition unit, configured to acquire a target transition frame from the dynamic image data according to the preset frame information by using the dynamic image rendering module; The determination unit is further used to determine the properties of the motion effect frame according to the target transition frame and the preset frame information.
10. An image rendering device, characterized in that: The device comprises: A memory, a processor and a communication bus, wherein the memory communicates with the processor via the communication bus, the memory stores an image rendering program executable by the processor, and when the image rendering program is executed, the method according to any one of claims 1 to 8 is performed by the processor.
11. A storage medium having a computer program stored thereon, applied to an image rendering device, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Video processing method, animation rendering SDK, equipment and computer storage medium
CN111899322A