Multi-layer illusion special effect resource generation method and device, equipment and storage medium

By using a multi-layer transformation effect resource generation method, blank areas are automatically identified and cropped, and layer offset adjustment is supported. This enables multi-layer collaborative processing and cross-platform compatibility, solving the shortcomings of existing multi-layer transformation effect tools and improving batch processing efficiency and ease of operation.

CN121962373APending Publication Date: 2026-05-01GUANGZHOU XINYU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU XINYU NETWORK TECH CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing multi-layer transformation effect creation tools do not support multi-layer collaborative processing, lack intelligent cropping capabilities, have high operational barriers, and low batch processing efficiency, thus failing to meet the needs of synchronous export of multi-size image animations and cross-platform compatibility.

Method used

This invention provides a method for generating multi-layered transformation effect resources. It receives resource packages by displaying a multi-layered transformation configuration interface, automatically identifies and crops blank areas, supports layer offset adjustment, batch generates multi-size WebP animations and packages them, and provides a graphical operation interface and cross-platform compatibility.

Benefits of technology

It enables multi-layer collaborative processing, automatically identifies and crops blank areas, lowers the operational threshold, improves batch processing efficiency, supports multi-size animation generation and cross-platform compatibility, and ensures data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962373A_ABST
    Figure CN121962373A_ABST
Patent Text Reader

Abstract

The invention provides a multi-layer illusion special effect resource generation method and device, equipment and a storage medium, and relates to the technical field of image processing. The method comprises the following steps: displaying a phantom multi-layer configuration interface; receiving a resource packet corresponding to each layer; carrying out blank area identification on the sequence frame image and the default static image of each image layer, calculating a uniform cuttable area, and carrying out cutting processing to obtain a target sequence frame image and a target static image of each image layer; based on a dragging operation of a user or an offset obtained by form input, adjusting the offset of the offset layer relative to the fixed layer, and outputting a target offset; and converting the target sequence frame images of each image layer into target animations in batches, exporting the target animations, generating a JSON configuration file, compressing and packaging the target animations, the target static images and the JSON configuration file, and generating a illusion special effect resource packet. And independent management of multi-layer resources, automatic identification and cutting of blank areas and accurate offset control of the layers are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices, and storage media for generating multi-layered transformation effect resources Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for generating multi-layered illusion effects resources. Background Technology

[0002] Transformation effects are visual effects created by combining and rendering multiple layers of images (such as avatars, wings, spirits, magical artifacts, and auras). These effects may include glowing lights, particle effects, or dynamic animations, aiming to enhance personalization and visual impact. Typically, it needs to support features such as layer position offset control, blank pixel area cropping, and multi-size animation export to meet the rendering needs of different scenes and reduce rendering pressure.

[0003] In existing technologies, the tools used for image cropping and animation generation mainly include the following:

[0004] ImageMagick: An open-source image editing suite that can crop images and composite WebP animations via command line. It requires the use of the -trim parameter to remove solid color borders before merging sequence frames, but it only supports single-layer processing and requires manual command writing, making it difficult to operate.

[0005] FFmpeg: Primarily used for audio and video processing, it can detect cropping regions using the cropdetect filter, but automatically cropping blank areas of multi-frame images is complex and requires the use of scripts, and it does not support multi-layer collaborative preview.

[0006] GIMPwith GAP: An open-source image editor combined with animation plugins, which can process images in batches via scripts, but has a low degree of automation and requires manual step-by-step operation for multi-layer processing;

[0007] Python script + PIL / Pillow: Requires users to have programming skills, customizes the trimming logic, has a very high barrier to entry for non-technical personnel, and does not support graphical operation;

[0008] Adobe Animate / AfterEffects: A professional GUI tool that supports cropping and animation export, but it is mainly geared towards single-layer processing, has low efficiency for multi-layer collaboration, insufficient performance when batch processing hundreds of images, and does not support automatic generation of multi-size configuration files.

[0009] The tools mentioned above only support single-layer preview generation and need to be used in conjunction with other tools to select the cropping area. They do not support simultaneous export of multi-size image animations. Some tools have limitations on the number and size of images that can be processed. In addition, some tools require technical expertise and a suitable environment. Summary of the Invention

[0010] This invention provides a method, apparatus, device, and storage medium for generating multi-layer transformation effect resources, which solves the defects of existing multi-layer transformation effect production tools that do not support multi-layer collaborative processing, lack intelligent cropping capabilities, have high operation thresholds, and have low batch processing efficiency. It achieves cross-platform high-efficiency processing with independent management of multi-layer resources, automatic identification and cropping of blank areas, precise layer offset control, dynamic and static combination preview, and one-click generation and packaging of multi-size WebP animations.

[0011] This invention provides a method for generating multi-layered illusion effects resources, including:

[0012] The multi-layer configuration interface for the transformation is displayed, which includes sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers.

[0013] The system receives resource packages for each layer uploaded by the user through the multi-layer configuration interface. The resource packages include: a default static image and a sequence of frame images used for compositing animations.

[0014] Blank areas are identified in the sequence frame images and default static images of each layer. A uniform croppable area is calculated and cropped to obtain the target sequence frame images and target static images of each layer.

[0015] Based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offset layer, adjust the offset of the offset layer relative to the fixed layer and output the target offset.

[0016] The target sequence frame images of each layer are converted into target animations and exported in batches, and a JSON configuration file is generated. The target animations, target static images and JSON configuration files are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of sequence frame images and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0017] According to a method for generating multi-layered illusion effects resources provided by the present invention, after identifying blank areas in the sequence frame images and default static images of each layer, calculating a uniform croppable area, and performing cropping processing to obtain the target image resources of each layer, the method further includes:

[0018] The target animation is displayed in a combined preview interface, which allows users to adjust the animation frame rate, display the corresponding animation effect when switching target layers, and automatically convert non-target layers to the corresponding default static image display.

[0019] According to a method for generating multi-layered illusion effects resources provided by the present invention, after identifying blank areas in the sequence frame images and default static images of each layer, calculating a uniform croppable area, and performing cropping processing to obtain the target image resources of each layer, the method further includes:

[0020] The sub-configuration interface of each layer displays the cutting coordinates and actual size of the corresponding cuttable area in real time.

[0021] According to the present invention, a method for generating multi-layer transformation effect resources is provided, wherein the transformation effect resource package corresponding to each layer includes multiple animations with different export sizes.

[0022] According to a method for generating multi-layered transformation effect resources provided by the present invention, the transformation effect resource package is named according to the rule of "layer name-frame rate-number of frames-animation duration".

[0023] According to a method for generating multi-layered illusion effects resources provided by the present invention, the step of identifying blank areas in the sequence frame images and default static images of each layer, calculating a uniform croppable area, and performing cropping processing to obtain the target sequence frame images and target static images of each layer includes:

[0024] Blank areas are identified for the sequence frame images and default static images of each layer, and the smallest blank area identified in all images is determined as the croppable area;

[0025] The sequence frame image and the default static image are cropped according to the cropping coordinates corresponding to the croppable region to obtain the target sequence frame image and the target static image.

[0026] According to a method for generating multi-layered illusion effects resources provided by the present invention, the step of batch converting the target sequence frame images of each layer into target animations and exporting them includes:

[0027] Each of the target sequence frame images is converted into a WebP format image and then compressed.

[0028] Each compressed WebP image is combined to generate a WebP animation, which is then exported.

[0029] The present invention also provides a device for generating multi-layered transformation effect resources, comprising:

[0030] The interface display module is used to display the multi-layer configuration interface for transformation, wherein the multi-layer configuration interface for transformation includes sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers;

[0031] The resource receiving module is used to receive the resource package corresponding to each layer uploaded by the user through the multi-layer configuration interface. The resource package includes: a default static image and a sequence frame image for compositing animation.

[0032] The blank cropping module is used to identify blank areas in the sequence frame images and default static images of each layer, calculate a uniform croppable area, and perform cropping processing to obtain the target sequence frame images and target static images of each layer.

[0033] The offset adjustment module is used to adjust the offset of the offsettable layer relative to the fixed layer based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offsettable layer, and output the target offset.

[0034] The resource generation module is used to batch convert the target sequence frame images of each layer into target animations and export them, while generating a JSON configuration file. The target animation, the target static image, and the JSON configuration file are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of the sequence frame images, and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0035] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for generating multi-layer transformation effect resources as described above.

[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating multi-layered illusion effects resources as described above.

[0037] The present invention provides a method, apparatus, device, and storage medium for generating multi-layered transformation effect resources, which, compared with the prior art, has the following beneficial technical effects:

[0038] 1. Supports multi-layer collaborative processing, specially adapted to the multi-layer structure of transformation effects, and meets the relative position control requirements of fixed layer (avatar layer) and other offset layers;

[0039] 2. Automatically identifies blank areas, calculates the croppable area, and displays the crop coordinates and actual size after cropping in real time, without manual intervention and without affecting the rendering effect;

[0040] 3. Provides a graphical user interface, supporting two offset control methods: manual dragging of layer positions and form input, lowering the barrier to entry and requiring no technical expertise;

[0041] 4. Enables multi-layer combination preview, unified control of all animation frame rates with unified frame rate adjustment, and free switching between layers to view the current animation effect. Other layers are automatically converted into preview static images, making it easy for users to intuitively view the special effects.

[0042] 5. One-click batch generation of multi-size animations and configuration files, fully automated processing, hundreds of images can be quickly converted, greatly improving efficiency;

[0043] 6. Cross-platform compatibility, supporting Windows, Mac, and Linux systems, with faster local upload, rendering, and generation speeds, and guaranteed data privacy and security;

[0044] 7. Automatic packaging and output, with naming conventions that include key information, and complete configuration files for easy use in subsequent development;

[0045] 8. Each functional module can be seamlessly replaced, and the operation is simple. The entire generation process involves different combinations of tools such as cropping, format conversion, compression, merging, packaging, and generating JSON configuration files. All of these are hidden at the underlying level and can be achieved with one click. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in this invention 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0047] Figure 1 is a flowchart illustrating the method for generating multi-layered illusion effects resources provided by the present invention;

[0048] Figure 2 is a schematic diagram of a multi-layer configuration interface for a specific embodiment of the present invention;

[0049] Figure 3 is a schematic diagram of the structure of the device for generating multi-layer illusion effects resources provided by the present invention;

[0050] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0052] It should be noted that in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and do not limit the number of objects; for example, a first object can be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0053] The following description, in conjunction with Figures 1 to 4, describes a method, apparatus, device, and storage medium for generating multi-layered illusion effects resources according to the present invention.

[0054] As shown in Figure 1, this invention provides a method for generating multi-layered transformation effect resources, applied to an innovatively developed transformation effect generation system. This method specifically includes the following steps:

[0055] Step 110: Display the multi-layer transformation configuration interface, wherein the multi-layer transformation configuration interface includes multiple sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers.

[0056] Specifically, the transformation effect generation system provides a multi-layer transformation configuration interface, as shown in Figure 2. This interface includes multiple sub-configuration interfaces for each layer, and users can click on the layer option to switch to different sub-configuration interfaces for subsequent operations.

[0057] In the exemplary embodiment of Figure 2, the transformation effect is composed of animation effects from five layers: the Avatar layer (fixed layer), the Zero Wing layer (offsettable layer), the Spiritual Connection layer (offsettable layer), the Magic Weapon layer (offsettable layer), and the Aura layer (offsettable layer). Therefore, the transformation multi-layer configuration interface includes sub-configuration interfaces for these five layers, with layer options being Avatar, Zero Wing, Spiritual Connection, Magic Weapon, and Aura.

[0058] Step 120: Receive the resource package corresponding to each layer uploaded by the user through the multi-layer configuration interface. The resource package includes: a default static image and a sequence of frame images for compositing animation.

[0059] Specifically, as shown in Figure 2, users can upload corresponding resource packages through the sub-configuration interface for each layer. The resource packages are in compressed format and contain the default static image (JPG / PNG format) for that layer, as well as sequence frame images (JPG / PNG format) used for compositing animations. After receiving the resource package, the system can decompress it to a local temporary directory using a decompression tool such as JSZip, adm-zip, or unzipper.

[0060] Step 130: Identify blank areas in the sequence frame images and default static images of each layer, calculate a uniform croppable area, and perform cropping processing to obtain the target sequence frame images and target static images of each layer.

[0061] Specifically, step 130 may include:

[0062] Blank areas are identified for the sequence frame images and default static images of each layer, and the smallest blank area identified in all images is determined as the croppable area;

[0063] The sequence frame image and the default static image are cropped according to the cropping coordinates corresponding to the croppable region to obtain the target sequence frame image and the target static image.

[0064] In this step, the system iterates through all sequence frame images and default static images after decompression of each layer, automatically identifies uniform blank pixel areas (solid color borders) in the images, compares the blank areas of each image, and when the blank areas of different images in the same layer are inconsistent in size, it will determine the uniform croppable area according to the minimum intersection of the blank areas of all images (i.e., the range corresponding to the minimum blank area). The system determines the cropping coordinates through a pixel traversal comparison algorithm and performs batch cropping processing to completely preserve the effective content of all images in the current layer.

[0065] In some embodiments, after step 130, the method may further include: displaying the cutting coordinates and actual size after cutting of the corresponding cuttable area in real time on the sub-configuration interface of each layer.

[0066] In this embodiment, as shown in Figure 2, the cropping coordinates are determined by a pixel point traversal comparison algorithm, including the cropping coordinates of the upper left corner and the cropping coordinates of the lower right corner. The actual width and height of the cropped image are calculated using the cropping coordinates, and the above cropping parameters are displayed on the interface in real time.

[0067] Step 140: Based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offset layer, adjust the offset of the offset layer relative to the fixed layer, and output the target offset.

[0068] Specifically, an offset control function is configured for the offset layer, allowing users to adjust the position in two ways: manual dragging and form input. This adjusts the position of the non-base layer (offset layer) relative to the base layer (fixed layer), achieving spatial alignment of special effects elements, layout adaptation of special effects, dynamic hierarchy, or specific visual effects.

[0069] Manual drag: Drag the layer icon directly in the sub-configuration interface to adjust the position of a relatively fixed layer in real time;

[0070] Form input: As shown in Figure 2, enter the vertical and horizontal offset values ​​in the input boxes on the interface to precisely control the offset distance. The unit of offset is pixels.

[0071] Step 150: Batch convert the target sequence frame images of each layer into target animations and export them. At the same time, generate a JSON configuration file. Compress and package the target animations, target static images, and JSON configuration files to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of the sequence frame images, and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0072] Specifically, based on a preset export size, the target sequence frame images of each layer are batch-converted to generate WebP format animations of the corresponding sizes. In some embodiments, the transformation effect resource package corresponding to each layer includes multiple animations with different export sizes. The preset export size can include multiple sizes, exporting WebP animations of different sizes. For example, converting to WebP animations of multiple sizes such as 720×720, 360×360, 288×288, 180×180, and 72×72 to meet the display requirements of dynamic effects.

[0073] In addition, a corresponding JSON configuration file is generated for each layer, which contains the following core information:

[0074] Animation export dimensions: Actual width and height, and scale factor corresponding to each preset size;

[0075] Layer information: layer name, total number of sequence frames, total animation duration, default frame rate;

[0076] Actual size information of the sequence frame: the size after cropping;

[0077] Crop coordinates: top left corner coordinates, bottom right corner coordinates;

[0078] Target offset: The vertical and horizontal offset of the offset layer relative to the fixed layer.

[0079] The target static images of each layer, WebP animations of each size, and the corresponding JSON configuration files are packaged into a transformation effect resource package. In some embodiments, the transformation effect resource package is named according to the rule of "layer name-frame rate-number of frames-animation duration". After the user selects the save location, the export is completed. After packaging, the original resource package in the local temporary directory can be automatically deleted to free up storage space.

[0080] In some embodiments, the batch conversion and export of the target sequence frame images of each layer into a target animation includes:

[0081] Each of the target sequence frame images is converted into a WebP format image and then compressed.

[0082] Each compressed WebP image is combined to generate a WebP animation, which is then exported.

[0083] In this embodiment, each target sequence frame image of each layer is converted into a WebP format image and then compressed to ensure optimized single-frame size, avoid excessively large single-frame size leading to bloated animation files, and optimize loading efficiency.

[0084] In other embodiments, compression can be performed after the WebP animation is generated. In this case, the animation compression optimizes the animation container and inter-frame redundancy, further reducing the overall size of the animation file while ensuring the smoothness of the animation.

[0085] Furthermore, each compression process can simultaneously calculate the total file size comparison before and after compression, displaying the compression effect in real time (e.g., "Original size: 100MB; Compressed size: 30MB, reduction rate 70%)), allowing users to intuitively understand the resource optimization effect. The aforementioned file size comparison data can also be added to the JSON configuration file. This data will be packaged along with the JSON configuration file into the final transformation effect resource package, serving as an optimization archive for that layer's resources. This facilitates tracking the resource compression effect during subsequent development or debugging, for example, checking whether animation loading stutters are caused by excessive file size.

[0086] In some embodiments, the method may further include:

[0087] The target animation is displayed in a combined preview interface, which allows users to adjust the animation frame rate, display the corresponding animation effect when switching target layers, and automatically convert non-target layers to the corresponding default static image display.

[0088] In this embodiment, the system also provides a combined preview interface, supporting users to adjust the animation frame rate. When a user selects a target layer to view the animation effect, that target layer plays the WebP animation at the set frame rate, while other non-target layers are automatically converted to their corresponding default static images for display, ensuring a clear preview effect and reducing rendering pressure. The preview interface can be rendered using canvas or CSS3 technology.

[0089] The method for generating multi-layered transformation effect resources provided above, which is applied to a transformation effect generation system, has the following beneficial technical effects compared to existing technologies:

[0090] 1. Supports multi-layer collaborative processing, specially adapted to the multi-layer structure of transformation effects, and meets the relative position control requirements of fixed layer (avatar layer) and other offset layers;

[0091] 2. Automatically identifies blank areas, calculates the croppable area, and displays the crop coordinates and actual size after cropping in real time, without manual intervention and without affecting the rendering effect;

[0092] 3. Provides a graphical user interface, supporting two offset control methods: manual dragging of layer positions and form input, lowering the barrier to entry and requiring no technical expertise;

[0093] 4. Enables multi-layer combination preview, unified control of all animation frame rates with unified frame rate adjustment, and free switching between layers to view the current animation effect. Other layers are automatically converted into preview static images, making it easy for users to intuitively view the special effects.

[0094] 5. One-click batch generation of multi-size animations and configuration files, fully automated processing, hundreds of images can be quickly converted, greatly improving efficiency;

[0095] 6. Cross-platform compatibility, supporting Windows, Mac, and Linux systems, with faster local upload, rendering, and generation speeds, and guaranteed data privacy and security;

[0096] 7. Automatic packaging and output, with naming conventions that include key information, and complete configuration files for easy use in subsequent development;

[0097] 8. Each functional module can be seamlessly replaced, and the operation is simple. The entire generation process involves different combinations of tools such as cropping, format conversion, compression, merging, packaging, and generating JSON configuration files. All of these are hidden at the underlying level and can be achieved with one click.

[0098] The apparatus for generating multi-layer illusion effects resources provided by the present invention will be described below. The apparatus for generating multi-layer illusion effects resources described below and the method for generating multi-layer illusion effects resources described above can be referred to in correspondence.

[0099] As shown in Figure 3, the present invention also provides a device for generating multi-layer transformation effect resources, comprising:

[0100] The interface display module 310 is used to display the multi-layer configuration interface for transformation, wherein the multi-layer configuration interface for transformation includes sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers;

[0101] The resource receiving module 320 is used to receive the resource package corresponding to each layer uploaded by the user through the multi-layer configuration interface. The resource package includes: a default static image and a sequence frame image for compositing animation.

[0102] Blank cropping module 330 is used to identify blank areas in the sequence frame images and default static images of each layer, calculate a uniform croppable area, and perform cropping processing to obtain the target sequence frame images and target static images of each layer.

[0103] The offset adjustment module 340 is used to adjust the offset of the offsettable layer relative to the fixed layer based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offsettable layer, and output the target offset.

[0104] The resource generation module 350 is used to batch convert the target sequence frame images of each layer into target animations and export them, and at the same time generate a JSON configuration file. The target animation, the target static image and the JSON configuration file are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of the sequence frame images and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0105] Figure 4 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 4, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440. The processor 410, communication interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for generating multi-layered illusion effects resources. This method includes:

[0106] The multi-layer configuration interface for the transformation is displayed, which includes sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers.

[0107] The system receives resource packages for each layer uploaded by the user through the multi-layer configuration interface. The resource packages include: a default static image and a sequence of frame images used for compositing animations.

[0108] Blank areas are identified in the sequence frame images and default static images of each layer. A uniform croppable area is calculated and cropped to obtain the target sequence frame images and target static images of each layer.

[0109] Based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offset layer, adjust the offset of the offset layer relative to the fixed layer and output the target offset.

[0110] The target sequence frame images of each layer are converted into target animations and exported in batches, and a JSON configuration file is generated. The target animations, target static images and JSON configuration files are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of sequence frame images and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0111] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0112] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer being able to execute the method for generating multi-layer transformation effect resources provided by the above methods, the method comprising:

[0113] The multi-layer configuration interface for the transformation is displayed, which includes sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers.

[0114] The system receives resource packages for each layer uploaded by the user through the multi-layer configuration interface. The resource packages include: a default static image and a sequence of frame images used for compositing animations.

[0115] Blank areas are identified in the sequence frame images and default static images of each layer. A uniform croppable area is calculated and cropped to obtain the target sequence frame images and target static images of each layer.

[0116] Based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offset layer, adjust the offset of the offset layer relative to the fixed layer and output the target offset.

[0117] The target sequence frame images of each layer are converted into target animations and exported in batches, and a JSON configuration file is generated. The target animations, target static images and JSON configuration files are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of sequence frame images and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0118] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for generating multi-layered illusion effects resources provided by the methods described above, the method comprising:

[0119] The multi-layer configuration interface for the transformation is displayed, which includes sub-configuration interfaces for multiple layers, and the layers include fixed layers and multiple offset layers.

[0120] The system receives resource packages for each layer uploaded by the user through the multi-layer configuration interface. The resource packages include: a default static image and a sequence of frame images used for compositing animations.

[0121] Blank areas are identified in the sequence frame images and default static images of each layer. A uniform croppable area is calculated and cropped to obtain the target sequence frame images and target static images of each layer.

[0122] Based on the offset obtained by the user's drag operation or form input on the sub-configuration interface of the offset layer, adjust the offset of the offset layer relative to the fixed layer and output the target offset.

[0123] The target sequence frame images of each layer are converted into target animations and exported in batches, and a JSON configuration file is generated. The target animations, target static images and JSON configuration files are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of sequence frame images and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

[0124] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating multi-layered illusion effect resources, characterized in that, include: The system displays a multi-layered transformation configuration interface, which includes sub-configuration interfaces for multiple layers. These layers include a fixed layer and multiple offset layers. The system receives resource packages for each layer uploaded by the user through the multi-layered transformation configuration interface. These resource packages include a default static image and sequence frame images for animation synthesis. Blank areas are identified in the sequence frame images and default static images of each layer. A unified croppable area is calculated and cropped to obtain the target sequence frame image and target static image for each layer. Based on the offset obtained by the user through dragging operations or form input in the sub-configuration interface of the offset layer, the offset of the offset layer relative to the fixed layer is adjusted, and the target offset is output. The system batch-converts the target sequence frame images of each layer into target animations and exports them, while simultaneously generating a JSON configuration file. The target animation, the target static image, and the JSON configuration file are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes the animation export size, layer information, actual size information of the sequence frame images, and cropping coordinates. The JSON configuration file for the offset layers also includes the target offset.

2. The method for generating multi-layered transformation effect resources according to claim 1, characterized in that, Also includes: The target animation is displayed in a combined preview interface, which allows users to adjust the animation frame rate, display the corresponding animation effect when switching target layers, and automatically convert non-target layers to the corresponding default static image display.

3. The method for generating multi-layered illusion effect resources according to claim 1, characterized in that, After identifying blank areas, calculating uniform croppable areas, and performing cropping processing on the sequence frame images and default static images of each layer to obtain the target image resources of each layer, the method further includes: displaying the cropping coordinates and actual size after cropping of the corresponding croppable areas in real time on the sub-configuration interface of each layer.

4. The method for generating multi-layered illusion effect resources according to claim 1, characterized in that, The transformation effect resource package corresponding to each layer includes multiple animations with different export sizes.

5. The method for generating multi-layered illusion effect resources according to claim 1, characterized in that, The transformation effect resource pack is named according to the rule of "layer name-frame rate-number of frames-animation duration".

6. The method for generating multi-layered illusion effect resources according to claim 1, characterized in that, The step of identifying blank areas in the sequence frame images and default static images of each layer, calculating a unified croppable region, and performing cropping processing to obtain the target sequence frame images and target static images of each layer includes: identifying blank areas in the sequence frame images and default static images of each layer, determining the smallest blank area identified in all images as the croppable region; and performing cropping processing on the sequence frame images and the default static images according to the cropping coordinates corresponding to the croppable region to obtain the target sequence frame images and the target static images.

7. The method for generating multi-layered illusion effect resources according to claim 1, characterized in that, The step of batch converting the target sequence frame images of each layer into target animations and exporting them includes: converting each target sequence frame image into a WebP format image and compressing it; and combining each compressed WebP format image to generate a WebP animation and exporting it.

8. A device for generating multi-layered illusion effects resources, characterized in that, include: The interface display module is used to display the multi-layer configuration interface, which includes sub-configuration interfaces for multiple layers, including fixed layers and multiple offset layers; the resource receiving module is used to receive resource packages corresponding to each layer uploaded by the user through the multi-layer configuration interface, the resource packages including: a default static image and sequence frame images for compositing animation; the blank cropping module is used to identify blank areas in the sequence frame images and default static images of each layer, calculate a uniform croppable area, and perform cropping processing to obtain the target sequence frame image and target static image of each layer; the offset adjustment module is used to adjust the offset based on the user's... The offset obtained by dragging or entering a form on the sub-configuration interface of the offset layer is used to adjust the offset of the offset layer relative to the fixed layer and output the target offset. The resource generation module is used to batch convert the target sequence frame images of each layer into target animations and export them, and at the same time generate a JSON configuration file. The target animation, the target static image and the JSON configuration file are compressed and packaged to generate a transformation effect resource package. The JSON configuration file includes: animation export size, layer information, actual size information of the sequence frame images and cropping coordinates. The JSON configuration file of the offset layer also includes the target offset.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for generating multi-layered illusion effects resources as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for generating multi-layered illusion effects resources as described in any one of claims 1 to 7.