A dynamic picture processing method, apparatus, device and medium

By combining non-first frame images with transparent images before processing dynamic images, the problems of turning dynamic images into static images and frame-by-frame processing errors are solved, thus achieving the integrity of information in each frame and the preservation of animation effects.

CN115633177BActive Publication Date: 2026-04-07XUNLEI NETWORKING TECHNOLOGIES LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-04
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, dynamic images are processed into static images, and errors occur when processing them frame by frame because the information in multiple frames is incomplete.

Method used

By acquiring a transparent image, the non-first frame images of the dynamic image to be processed are combined with the transparent image to obtain the target dynamic image, and then frame-by-frame preset processing is performed.

Benefits of technology

Ensure the integrity of information in each frame of the image, avoid errors during frame-by-frame processing, and preserve the animation effects of the original image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633177B_ABST
    Figure CN115633177B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for processing dynamic images, including: acquiring a transparent image; compositing non-first frame images of the dynamic image to be processed with the transparent image to obtain a corresponding target dynamic image; and performing frame-by-frame preset processing on the target dynamic image. By compositing non-first frame images with the transparent image before performing frame-by-frame preset processing on the dynamic image, the integrity of information in each frame is ensured, thereby avoiding errors during frame-by-frame processing and ensuring that the processed image retains the animation effect of the original image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of picture processing, in particular to a dynamic picture processing method, device, equipment and medium. BACKGROUND

[0002] At present, the processing scheme for dynamic pictures usually only processes the first frame of the dynamic picture, resulting in that the dynamic picture becomes a static picture after processing. Because the dynamic picture compresses the same pixels of multiple frames in order to reduce the picture storage volume, the information of the frames of the dynamic picture is incomplete except for the first frame after frame splitting. If the pictures are processed frame by frame, errors will occur. SUMMARY

[0003] Therefore, the present application aims to provide a dynamic picture processing method, device, equipment and medium, which can guarantee the information integrity of each frame of picture, thereby avoiding errors when processing frame by frame and guaranteeing that the processed picture retains the animation effect of the original picture. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a dynamic picture processing method, comprising:

[0005] obtaining a transparent picture;

[0006] performing a synthesis operation on non-first frame pictures of a to-be-processed dynamic picture and the transparent picture respectively to obtain corresponding target dynamic pictures;

[0007] performing preset processing on the target dynamic pictures frame by frame.

[0008] Optionally, the preset processing on the target dynamic pictures frame by frame comprises:

[0009] scaling processing on the target dynamic pictures frame by frame.

[0010] Optionally, the to-be-processed dynamic picture comprises multiple dynamic pictures, and the preset processing on the target dynamic pictures frame by frame comprises:

[0011] performing synthesis processing on multiple target dynamic pictures corresponding to the multiple dynamic pictures frame by frame.

[0012] Optionally, before the synthesis processing on the multiple target dynamic pictures corresponding to the multiple dynamic pictures frame by frame, the method further comprises:

[0013] determining a to-be-scaled dynamic picture from the multiple target dynamic pictures; the to-be-scaled dynamic picture is one or more dynamic pictures in the multiple target dynamic pictures;

[0014] scaling the to-be-scaled dynamic picture frame by frame to a target size.

[0015] Optionally, the step of performing frame-by-frame compositing of the multiple target dynamic images corresponding to the multiple dynamic images includes:

[0016] If the sizes of the multiple target dynamic images are inconsistent, a standard dynamic image is determined from the multiple target dynamic images. Based on the pixel coordinates of each frame in the standard dynamic image, the pixel coordinates of the corresponding frame in the non-standard dynamic image are determined, and the composite coordinates of each frame in the non-standard dynamic image are obtained.

[0017] Based on the synthesized coordinates, non-standard animated images and standard animated images are synthesized frame by frame.

[0018] Optional, also includes:

[0019] If the number of frames of the multiple animated images is inconsistent, then the first animated image is frame-stripped to obtain an animated image with the same number of frames as the second animated image.

[0020] Wherein, the first animated image is the animated image that does not have the lowest frame rate among the plurality of animated images, and the second animated image is the animated image with the lowest frame rate among the plurality of animated images.

[0021] Optional, also includes:

[0022] If the playback delays of the multiple animated images are inconsistent, the playback delay of the first animated image shall be modified according to the playback delay of the second animated image.

[0023] Wherein, the first animated image is the animated image with the lowest frame rate among the plurality of animated images, and the second animated image is the animated image with the lowest frame rate among the plurality of animated images.

[0024] Secondly, this application discloses a dynamic image processing apparatus, comprising:

[0025] The transparent image acquisition module is used to acquire transparent images.

[0026] The transparent image compositing module is used to compose the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image;

[0027] The image preset processing module is used to perform frame-by-frame preset processing on the target dynamic image.

[0028] Thirdly, this application discloses an electronic device, including a memory and a processor, wherein:

[0029] The memory is used to store computer programs;

[0030] The processor is used to execute the computer program to implement the aforementioned dynamic image processing method.

[0031] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned dynamic image processing method.

[0032] As can be seen, this application first obtains a transparent image, then composites the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image, and finally performs frame-by-frame preset processing on the target dynamic image. That is, before performing frame-by-frame preset processing on the dynamic image, this application first composites the non-first frame images with the transparent image. This ensures the integrity of the information in each frame, thereby avoiding errors during frame-by-frame processing and ensuring that the processed image retains the animation effect of the original image. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 This is a flowchart of a dynamic image processing method disclosed in this application;

[0035] Figure 2 This is a schematic diagram illustrating a specific dynamic image scaling process disclosed in this application;

[0036] Figure 3 This is a schematic diagram of a dynamic image compositing process disclosed in this application;

[0037] Figure 4 This is a schematic diagram illustrating the synthesis of two specific target dynamic images disclosed in this application;

[0038] Figure 5 This is a schematic diagram of the structure of a dynamic image processing device disclosed in this application;

[0039] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] Currently, processing solutions for animated images often only process the first frame, resulting in a static image after processing. This is because animated images compress identical pixels across multiple frames to reduce storage size, leading to incomplete information in all frames except the first. Processing each frame sequentially would result in errors. Therefore, this application provides an animated image processing solution that ensures the integrity of information in each frame, avoiding errors during frame-by-frame processing and guaranteeing that the processed image retains the original animation effect.

[0042] See Figure 1 As shown in the figure, this application discloses a dynamic image processing method, including:

[0043] Step S11: Obtain a transparent image;

[0044] In this transparent image, all pixels are transparent pixels. The size of the transparent image is the same as the size of the animated image to be processed.

[0045] Step S12: Combine the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image.

[0046] In one implementation, if the dynamic image to be processed is a single dynamic image, then the non-first frame images of the dynamic image are combined with the transparent image to obtain the corresponding target dynamic image.

[0047] In another implementation, if the animated image to be processed includes multiple animated images, then the non-first frame image of each animated image is combined with the transparent image to obtain a target animated image corresponding to each animated image. That is, multiple target animated images are obtained, wherein there are two or more of these multiple target animated images.

[0048] Furthermore, the dynamic image is first split into frames, and then the non-first frame images are combined with the transparent image to obtain the corresponding target dynamic image.

[0049] It should be noted that animated images compress identical pixels across multiple frames to reduce storage size. This results in inconsistent frame sizes after the animated image is split into frames. To ensure consistent frame sizes for subsequent image processing, this application uses a pre-sized transparent image and non-first frame images for compositing. GIFs, APNGs, and other animated images employ pixel compression algorithms to reduce storage size during multi-frame image compositing. This algorithm is implemented within the animated image itself; transparent pixels only fill the default portions of the image, ensuring consistent frame size. The pre-sized image is the same as the size of the animated image to be processed.

[0050] Step S13: Perform frame-by-frame preset processing on the target dynamic image.

[0051] In one implementation, the target animated image is scaled frame by frame. For example, see... Figure 2 As shown, Figure 2 This is a schematic diagram of a specific dynamic image scaling process disclosed in an embodiment of this application. The dynamic image with a size of 300*300 and a total of 30 frames is first split into frames. Starting from the second frame, it is combined with a transparent image with a size of 300*300 frame by frame. Then, it is scaled down to a 100*100 image frame by frame, and finally a 100*100 dynamic image with a total of 30 frames is obtained.

[0052] In another implementation, the dynamic image to be processed may include multiple dynamic images, and the multiple target dynamic images corresponding to the multiple dynamic images are synthesized frame by frame.

[0053] For example, see Figure 3 As shown, Figure 3 This application discloses a schematic diagram of dynamic image synthesis processing. Two 30-frame dynamic images are first synthesized with transparent images, and the size of the transparent images is the same as the size of the original dynamic images. Specifically, the non-first frame images of each dynamic image are synthesized with the transparent images. Then, the two dynamic images are synthesized frame by frame to obtain the synthesized dynamic image.

[0054] In one implementation, a dynamic image to be scaled can be determined from a plurality of target dynamic images; the dynamic image to be scaled is one or more dynamic images from the plurality of target dynamic images; and the dynamic image to be scaled is scaled frame by frame to the target size.

[0055] For example, see Figure 4 As shown, Figure 4This is a schematic diagram of the synthesis of two target animated images disclosed in an embodiment of this application. The two target animated images are 200*200 and 500*250 respectively. The 500*250 image is processed into 500*200 to make the stitching of the two target animated images more aesthetically pleasing.

[0056] Furthermore, in one embodiment, if the sizes of the multiple target animated images are inconsistent, a standard animated image is determined from the multiple target animated images. Based on the pixel coordinates of each frame in the standard animated image, the pixel coordinates of the corresponding frame in the non-standard animated image are determined, resulting in the composite coordinates of each frame in the non-standard animated image. Based on the composite coordinates, the non-standard animated image and the standard animated image are composited frame by frame. For example, instead of multiple, there are two: the last column of pixels in the first frame of the first target animated image is (x1, y1), (x1, y2), (x1, y3)..., and the composite coordinates of the first column of the second target animated image are (x1+n, y1), (x1+n, y2), (x1+n, y3)..., where n is the horizontal coordinate distance between two pixels.

[0057] Furthermore, in one embodiment, if the frame counts of the plurality of animated images are inconsistent, frames are extracted from the first animated image to obtain an animated image with the same frame count as the second animated image; wherein, the first animated image is the animated image among the plurality of animated images that does not have the lowest frame count, and the second animated image is the animated image among the plurality of animated images that has the lowest frame count.

[0058] In other words, between the synthesis operations of the non-first frame images of the dynamic image to be processed with the transparent image, multiple dynamic images can be processed into dynamic images with the same number of frames.

[0059] Furthermore, in one embodiment, if the playback delays of the plurality of animated images are inconsistent, the playback delay of the first animated image is modified according to the playback delay of the second animated image; wherein, the first animated image is the animated image among the plurality of animated images that does not have the lowest frame rate, and the second animated image is the animated image among the plurality of animated images that has the lowest frame rate. Additionally, before modifying the playback delay of the first animated image according to the playback delay of the second animated image, a frame-skipping operation is performed on the second animated image to make its frame rate consistent with that of the first animated image.

[0060] Understandably, playback latency, which is the time interval between two frames, needs to be consistent across multiple animated images before compositing. For example, if the animation with the lower frame rate has a playback latency of 0.2 seconds and the animation with the higher frame rate has a playback latency of 0.1 seconds, then the higher frame rate animation will have its frames extracted first, and its playback latency will be adjusted to 0.2 seconds. For instance, if one animated image has a playback latency of 0.2 seconds (25 frames) and another has a playback latency of 0.1 seconds (30 frames), then the 30-frame animated image will have its frames extracted to 25 frames, and its playback latency will be adjusted to 0.2 seconds.

[0061] As can be seen, this embodiment first obtains a transparent image, then composites the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image. Finally, the target dynamic image undergoes frame-by-frame preset processing. That is, before performing frame-by-frame preset processing on the dynamic image, this embodiment first composites the non-first frame images with the transparent image. This ensures the integrity of the information in each frame, thereby avoiding errors during frame-by-frame processing and ensuring that the processed image retains the animation effect of the original image.

[0062] See Figure 5 As shown in the figure, this application discloses a dynamic image processing device, including:

[0063] Transparent image acquisition module 11 is used to acquire transparent images;

[0064] The transparent image compositing module 12 is used to compose the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image.

[0065] Image preset processing module 13 is used to perform frame-by-frame preset processing on the target dynamic image.

[0066] As can be seen, this embodiment first obtains a transparent image, then composites the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image. Finally, the target dynamic image undergoes frame-by-frame preset processing. That is, before performing frame-by-frame preset processing on the dynamic image, this embodiment first composites the non-first frame images with the transparent image. This ensures the integrity of the information in each frame, thereby avoiding errors during frame-by-frame processing and ensuring that the processed image retains the animation effect of the original image.

[0067] In one embodiment, the image preset processing module 13 is specifically used to perform frame-by-frame scaling processing on the target dynamic image.

[0068] In another embodiment, the dynamic image to be processed includes multiple dynamic images, and the image preset processing module 13 is specifically used to perform frame-by-frame synthesis processing on the multiple target dynamic images corresponding to the multiple dynamic images.

[0069] Furthermore, the device also includes: a dynamic image to be scaled processing module, used to determine a dynamic image to be scaled from the multiple target dynamic images before the image preset processing module 13 performs frame-by-frame synthesis processing on the multiple target dynamic images corresponding to the multiple dynamic images; the dynamic image to be scaled is one or more dynamic images among the multiple target dynamic images; and the dynamic image to be scaled is scaled frame by frame to the target size.

[0070] Furthermore, in one embodiment, the image preset processing module 13 is used to determine a standard dynamic image from the multiple target dynamic images if the sizes of the multiple target dynamic images are inconsistent, determine the pixel coordinates of the corresponding frame image in the non-standard dynamic image based on the pixel coordinates of each frame image in the standard dynamic image, and obtain the composite coordinates of each frame image in the non-standard dynamic image; and perform frame-by-frame composite processing between the non-standard dynamic image and the standard dynamic image based on the composite coordinates.

[0071] In addition, the device also includes a frame extraction module, which is used to extract frames from the first dynamic image to obtain a dynamic image with the same number of frames as the second dynamic image if the frame numbers of the multiple dynamic images are inconsistent.

[0072] Wherein, the first animated image is the animated image that does not have the lowest frame rate among the plurality of animated images, and the second animated image is the animated image with the lowest frame rate among the plurality of animated images.

[0073] Furthermore, the device also includes a playback delay processing module, which is used to modify the playback delay of the first dynamic image according to the playback delay of the second dynamic image if the playback delays of the multiple dynamic images are inconsistent.

[0074] Wherein, the first animated image is the animated image with the lowest frame rate among the plurality of animated images, and the second animated image is the animated image with the lowest frame rate among the plurality of animated images.

[0075] See Figure 6 As shown in the illustration, this application discloses an electronic device 20, including a processor 21 and a memory 22; wherein, the memory 22 is used to store a computer program; and the processor 21 is used to execute the computer program to implement the following steps:

[0076] Obtain a transparent image; combine the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image; perform frame-by-frame preset processing on the target dynamic image.

[0077] As can be seen, this embodiment first obtains a transparent image, then composites the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image. Finally, the target dynamic image undergoes frame-by-frame preset processing. That is, before performing frame-by-frame preset processing on the dynamic image, this embodiment first composites the non-first frame images with the transparent image. This ensures the integrity of the information in each frame, thereby avoiding errors during frame-by-frame processing and ensuring that the processed image retains the animation effect of the original image.

[0078] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: performing frame-by-frame scaling processing on the target dynamic image.

[0079] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: the dynamic image to be processed includes multiple dynamic images, and the multiple target dynamic images corresponding to the multiple dynamic images are combined frame by frame.

[0080] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: before performing frame-by-frame synthesis processing on the multiple target dynamic images corresponding to the multiple dynamic images, a dynamic image to be scaled is determined from the multiple target dynamic images; the dynamic image to be scaled is one or more dynamic images among the multiple target dynamic images; the dynamic image to be scaled is scaled frame by frame to the target size.

[0081] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: if the sizes of the multiple target dynamic images are inconsistent, a standard dynamic image is determined from the multiple target dynamic images; the pixel coordinates of the corresponding frame image in the non-standard dynamic image are determined based on the pixel coordinates of each frame image in the standard dynamic image, and the composite coordinates of each frame image in the non-standard dynamic image are obtained; the non-standard dynamic image and the standard dynamic image are composited frame by frame based on the composite coordinates.

[0082] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: if the frame counts of the plurality of dynamic images are inconsistent, then the first dynamic image is frame-stripped to obtain a dynamic image with the same frame count as the second dynamic image; wherein, the first dynamic image is the dynamic image with the lowest frame count among the plurality of dynamic images, and the second dynamic image is the dynamic image with the lowest frame count among the plurality of dynamic images.

[0083] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, it can specifically implement the following steps: if the playback delays of the multiple animated images are inconsistent, the playback delay of the first animated image is modified according to the playback delay of the second animated image; wherein, the first animated image is the animated image with the lowest frame rate among the multiple animated images, and the second animated image is the animated image with the lowest frame rate among the multiple animated images.

[0084] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, and the storage method can be temporary storage or permanent storage.

[0085] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26; wherein, the power supply 23 is used to provide operating voltage for the various hardware devices on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0086] Furthermore, embodiments of this application disclose a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, performs the following steps:

[0087] Obtain a transparent image; combine the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image; perform frame-by-frame preset processing on the target dynamic image.

[0088] As can be seen, this embodiment first obtains a transparent image, then composites the non-first frame images of the dynamic image to be processed with the transparent image to obtain the corresponding target dynamic image. Finally, the target dynamic image undergoes frame-by-frame preset processing. That is, before performing frame-by-frame preset processing on the dynamic image, this embodiment first composites the non-first frame images with the transparent image. This ensures the integrity of the information in each frame, thereby avoiding errors during frame-by-frame processing and ensuring that the processed image retains the animation effect of the original image.

[0089] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, it can specifically implement the following steps: performing frame-by-frame scaling processing on the target dynamic image.

[0090] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, it can specifically implement the following steps: the dynamic image to be processed includes multiple dynamic images, and the multiple target dynamic images corresponding to the multiple dynamic images are synthesized frame by frame.

[0091] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, it can specifically implement the following steps: before performing frame-by-frame synthesis processing on the multiple target dynamic images corresponding to the multiple dynamic images, determine the dynamic image to be scaled from the multiple target dynamic images; the dynamic image to be scaled is one or more dynamic images among the multiple target dynamic images; scale the dynamic image to be scaled to the target size frame by frame.

[0092] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, it can specifically implement the following steps: if the sizes of the multiple target dynamic images are inconsistent, a standard dynamic image is determined from the multiple target dynamic images; the pixel coordinates of the corresponding frame image in the non-standard dynamic image are determined based on the pixel coordinates of each frame image in the standard dynamic image, and the composite coordinates of each frame image in the non-standard dynamic image are obtained; the non-standard dynamic image and the standard dynamic image are composited frame by frame based on the composite coordinates.

[0093] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, it can specifically implement the following steps: if the frame numbers of the plurality of dynamic images are inconsistent, then the first dynamic image is subjected to frame extraction to obtain a dynamic image with the same frame number as the second dynamic image; wherein, the first dynamic image is the dynamic image with the lowest frame number among the plurality of dynamic images, and the second dynamic image is the dynamic image with the lowest frame number among the plurality of dynamic images.

[0094] In this embodiment, when the computer subroutine stored in the computer-readable storage medium is executed by the processor, it can specifically implement the following steps: if the playback delays of the multiple animated images are inconsistent, the playback delay of the first animated image is modified according to the playback delay of the second animated image; wherein, the first animated image is the animated image with the lowest frame rate among the multiple animated images, and the second animated image is the animated image with the lowest frame rate among the multiple animated images.

[0095] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0096] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0097] The above provides a detailed description of a dynamic image processing method, apparatus, device, and medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for processing dynamic images, characterized in that, include: Get a transparent image; The non-first frame images of the dynamic image to be processed are combined with the transparent image to obtain the corresponding target dynamic image; wherein, a transparent image of a preset size is used to combine with the non-first frame images, and transparent pixels are filled into the default part of the image to make the image size of each frame consistent, and the preset size is the same as the size of the dynamic image to be processed. The target dynamic image is subjected to frame-by-frame preset processing.

2. The dynamic image processing method according to claim 1, characterized in that, The frame-by-frame preset processing of the target dynamic image includes: The target dynamic image is scaled frame by frame.

3. The dynamic image processing method according to claim 1, characterized in that, The animated image to be processed includes multiple animated images, and the frame-by-frame preset processing of the target animated image includes: The multiple target dynamic images corresponding to multiple dynamic images are synthesized frame by frame.

4. The dynamic image processing method according to claim 3, characterized in that, Before performing frame-by-frame synthesis of the multiple target dynamic images corresponding to the multiple dynamic images, the method further includes: The animated image to be scaled is determined from a plurality of target animated images; the animated image to be scaled is one or more animated images from the plurality of target animated images. The animated image to be scaled is scaled frame by frame to the target size.

5. The dynamic image processing method according to claim 3, characterized in that, The step of compositing multiple target dynamic images corresponding to multiple dynamic images frame by frame includes: If the sizes of the multiple target dynamic images are inconsistent, a standard dynamic image is determined from the multiple target dynamic images. Based on the pixel coordinates of each frame in the standard dynamic image, the pixel coordinates of the corresponding frame in the non-standard dynamic image are determined, and the composite coordinates of each frame in the non-standard dynamic image are obtained. Based on the synthesized coordinates, non-standard animated images and standard animated images are synthesized frame by frame.

6. The dynamic image processing method according to claim 3, characterized in that, Also includes: If the number of frames of the multiple animated images is inconsistent, then the first animated image is frame-stripped to obtain an animated image with the same number of frames as the second animated image. Wherein, the first animated image is the animated image that does not have the lowest frame rate among the plurality of animated images, and the second animated image is the animated image with the lowest frame rate among the plurality of animated images.

7. The dynamic image processing method according to claim 3, characterized in that, Also includes: If the playback delays of the multiple animated images are inconsistent, the playback delay of the first animated image shall be modified according to the playback delay of the second animated image. Wherein, the first animated image is the animated image with the lowest frame rate among the plurality of animated images, and the second animated image is the animated image with the lowest frame rate among the plurality of animated images.

8. A dynamic image processing device, characterized in that, include: A transparent image acquisition module is used to acquire transparent images; a transparent image synthesis module is used to synthesize the non-first frame images of the dynamic image to be processed with the transparent images to obtain the corresponding target dynamic image. The image preset processing module is used to perform frame-by-frame preset processing on the target dynamic image; In this process, a transparent image of a preset size is combined with a non-first frame image. Transparent pixels are filled into the default parts of the image to ensure that the image size of each frame remains consistent. The preset size is the same as the size of the dynamic image to be processed.

9. An electronic device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to implement the dynamic image processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the dynamic image processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video processing method and mobile terminal

    CN104811797A