An image processing method, device, computer and readable storage medium

By acquiring and utilizing the transformation information blocks of dynamic images, the region of each bitmap image is determined and transformed, thus solving the problem of poor flexibility in dynamic image transformation and achieving more flexible image transformation and resource saving.

CN114283054BActive Publication Date: 2026-03-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-28
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, the transformation flexibility of dynamic images is poor, especially during stretching, where the center stretching method results in insufficient transformation flexibility.

Method used

By acquiring the image header information of the original dynamic image, identifying the transformation information block, determining the transformation region of each bitmap image, and performing size transformation according to the transformation size, a transformed image is generated and finally combined into the target dynamic image, supporting more flexible transformation methods.

Benefits of technology

It improves the flexibility of dynamic image transformations, enables more dynamic effects, and effectively saves image size and bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114283054B_ABST
    Figure CN114283054B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an image processing method and device, a computer and a readable storage medium. The method comprises: obtaining image header information of an original dynamic image, and obtaining at least two bitmap images constituting the original dynamic image; if a transformation information block exists in the image header information, determining a corresponding image transformation region of each bitmap image according to transformation region information included in the transformation information block; obtaining an image transformation size, performing size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size, and obtaining a corresponding conversion image of each bitmap image; and outputting a target dynamic image according to the conversion image corresponding to each bitmap image. The present application can improve the flexibility of dynamic image transformation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an image processing method and device, a computer and a readable storage medium. BACKGROUND

[0002] Since the display effect of dynamic images is more diversified and rich than that of static images, the use of dynamic images is also more extensive, such as Animated Portable Network Graphics (APNG), which is a bitmap animation format based on Portable Network Graphics (PNG). At present, when APNG is used, it is often transformed to adapt to the scene to be displayed. When a dynamic image is stretched, it is usually stretched from the center position of each frame of the dynamic image, that is, the foreground content area size of each frame of the dynamic image is stretched from the center, and different frames of images are switched according to a specific time to realize dynamic display of the stretched APNG. However, this center stretching method makes the transformation flexibility of APNG poor. SUMMARY

[0003] The embodiments of the present application provide an image processing method and device, a computer and a readable storage medium, which can improve the flexibility of dynamic image transformation.

[0004] In one aspect, the embodiments of the present application provide an image processing method, which comprises:

[0005] Obtaining image header information of an original dynamic image and at least two bitmap images constituting the original dynamic image;

[0006] If the transformation information block exists in the image header information, determining the image transformation region corresponding to each bitmap image according to the transformation region information included in the transformation information block;

[0007] Obtaining an image transformation size, performing size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size, and obtaining a converted image corresponding to each bitmap image;

[0008] Outputting a target dynamic image according to the converted image corresponding to each bitmap image.

[0009] The transformation information block includes a first transformation information block and a second transformation information block; the i-th bitmap image corresponds to the first transformation information block; i is a positive integer, and i is less than the number of bitmap images included in the at least two bitmap images;

[0010] If the transformation information block exists in the image header information, the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block, comprising:

[0011] If the second transformation information block corresponding to the (i+1)th bitmap image does not exist in the image header information, the image transformation region of the (i+1)th bitmap image is determined according to the first transformation information block corresponding to the ith bitmap image.

[0012] If the second transformation information block corresponding to the (i+1)th bitmap image exists in the image header information, the image transformation region of the (i+1)th bitmap image is determined according to the second transformation information block.

[0013] The image transformation size is obtained, and the image transformation region corresponding to each bitmap image is size-transformed according to the image transformation size to obtain a converted image corresponding to each bitmap image, comprising:

[0014] The image transformation size is obtained.

[0015] The region transformation mode of the ith bitmap image is obtained, and the image transformation region corresponding to the ith bitmap image is transformed according to the image transformation size and the region transformation mode to obtain a converted image corresponding to the ith bitmap image; i is a positive integer, and i is less than or equal to the number of bitmap images included in the at least two bitmap images.

[0016] The region transformation mode of the ith bitmap image is a stretching transformation mode.

[0017] The image transformation region corresponding to the ith bitmap image is transformed according to the image transformation size and the region transformation mode to obtain a converted image corresponding to the ith bitmap image, comprising:

[0018] The wide interval and the high interval in the data filling information of the original dynamic image are obtained.

[0019] The predicted width and the predicted height of the image transformation region corresponding to the ith bitmap image are determined according to the wide interval, the high interval and the image transformation size.

[0020] The width of the image transformation region corresponding to the ith bitmap image is stretched to the predicted width, and the height of the image transformation region corresponding to the ith bitmap image is stretched to the predicted height by the stretching transformation mode, to obtain a converted image corresponding to the ith bitmap image.

[0021] The region transformation mode of the ith bitmap image is a copying transformation mode.

[0022] According to the image transformation size, the image transformation region corresponding to the i th bitmap image is transformed in a region transformation manner to obtain a converted image corresponding to the i th bitmap image, comprising:

[0023] According to the image transformation size, the predicted width and the predicted height of the image transformation region corresponding to the i th bitmap image are determined;

[0024] The region width and the region height of the image transformation region corresponding to the i th bitmap image are obtained, the first copy number of the image transformation region is determined according to the predicted width and the region width, and the second copy number of the image transformation region is determined according to the predicted height and the region height;

[0025] The predicted copy number is determined according to the first copy number and the second copy number, and the image transformation region corresponding to the i th bitmap image is copied by a copy transformation manner to obtain k image transformation regions; k is the predicted copy number;

[0026] Based on the first copy number and the second copy number, the k image transformation regions are arranged and spliced in the i th bitmap image to obtain the converted image corresponding to the i th bitmap image.

[0027] The image transformation size is obtained, comprising:

[0028] The communication session page is obtained, and the service data is obtained;

[0029] The spatial width and the display number of lines of the service data in the communication session page are determined, the display size of the information box in the communication session page is determined according to the spatial width and the display number of lines, and the display size of the information box is determined as the image transformation size; the information box is used for displaying the service data.

[0030] The target dynamic image is output according to the converted image corresponding to each bitmap image, comprising:

[0031] The converted image corresponding to each bitmap image is combined to obtain the target dynamic image;

[0032] The information box in the communication session page is obtained, the target dynamic image is determined as the background image in the information box, and the service data is displayed in the information box containing the target dynamic image.

[0033] The image transformation size is obtained, comprising:

[0034] In response to the stretching operation on the original dynamic image, the stretching width and the stretching height corresponding to the stretching operation are obtained, and the image transformation size is determined according to the stretching width and the stretching height.

[0035] The method comprises the following steps:

[0036] In response to the region transformation instruction for the original dynamic image, the region coverage position and the image transformation size in the region transformation instruction are acquired;

[0037] According to the image transformation size, the size of the image transformation region corresponding to each bitmap image is transformed, and a converted image corresponding to each bitmap image is obtained.

[0038] The converted image corresponding to each bitmap image is obtained by adding the coverage sub-image to the region coverage position in the corresponding bitmap image.

[0039] The method further comprises the following steps:

[0040] If the transformation information block does not exist in the image header information, the default transformation region is determined as the image transformation region of each bitmap image.

[0041] The embodiment of the application provides an image processing device, which comprises the following steps:

[0042] An information acquisition module is configured to acquire image header information of an original dynamic image and acquire at least two bitmap images constituting the original dynamic image.

[0043] A region determination module is configured to determine an image transformation region corresponding to each bitmap image according to transformation region information included in a transformation information block if the transformation information block exists in the image header information.

[0044] An image transformation module is configured to acquire an image transformation size, transform the size of the image transformation region corresponding to each bitmap image according to the image transformation size, and obtain a converted image corresponding to each bitmap image.

[0045] An image generation module is configured to output a target dynamic image according to the converted image corresponding to each bitmap image.

[0046] The transformation information block comprises a first transformation information block and a second transformation information block; the i-th bitmap image corresponds to the first transformation information block; i is a positive integer, and i is less than the number of bitmap images included in the at least two bitmap images.

[0047] The region determination module comprises the following steps:

[0048] A region acquisition unit is configured to determine the image transformation region of the (i+1)-th bitmap image according to the first transformation information block corresponding to the i-th bitmap image if the second transformation information block corresponding to the (i+1)-th bitmap image does not exist in the image header information.

[0049] The region acquisition unit is further configured to, if the second transformation information block corresponding to the (i+1)th bitmap image exists in the image header information, determine the image transformation region of the (i+1)th bitmap image according to the second transformation information block.

[0050] The image transformation module comprises:

[0051] The size acquisition unit is configured to acquire an image transformation size.

[0052] The region transformation unit is configured to acquire a region transformation manner of the ith bitmap image, transform the image transformation region corresponding to the ith bitmap image according to the region transformation manner and the image transformation size, and obtain a converted image corresponding to the ith bitmap image; i is a positive integer and i is less than or equal to the number of bitmap images included in the at least two bitmap images.

[0053] The region transformation manner of the ith bitmap image is a stretching transformation manner.

[0054] In the aspect of transforming the image transformation region corresponding to the ith bitmap image according to the region transformation manner and the image transformation size, and obtaining the converted image corresponding to the ith bitmap image, the region transformation unit comprises:

[0055] The interval acquisition subunit is configured to acquire a width interval and a height interval in data padding information of the original dynamic image.

[0056] The size prediction subunit is configured to determine a predicted width and a predicted height of the image transformation region corresponding to the ith bitmap image according to the width interval, the height interval and the image transformation size.

[0057] The region stretching subunit is configured to stretch the width of the image transformation region corresponding to the ith bitmap image to the predicted width and stretch the height of the image transformation region corresponding to the ith bitmap image to the predicted height by using the stretching transformation manner, and obtain the converted image corresponding to the ith bitmap image.

[0058] The region transformation manner of the ith bitmap image is a copying transformation manner.

[0059] In the aspect of transforming the image transformation region corresponding to the ith bitmap image according to the region transformation manner and the image transformation size, and obtaining the converted image corresponding to the ith bitmap image, the region transformation unit comprises:

[0060] The size determination subunit is configured to determine a predicted width and a predicted height of the image transformation region corresponding to the ith bitmap image according to the image transformation size.

[0061] The quantity obtaining subunit is configured to obtain a region width and a region height of the image transformation region corresponding to the i-th bitmap image, determine a first copy quantity of the image transformation region according to the predicted width and the region width, and determine a second copy quantity of the image transformation region according to the predicted height and the region height;

[0062] The region copying subunit is configured to determine a predicted copy quantity according to the first copy quantity and the second copy quantity, copy the image transformation region corresponding to the i-th bitmap image by using a copy transformation mode, and obtain k image transformation regions; k is the predicted copy quantity.

[0063] The region splicing subunit is configured to arrange and splice the k image transformation regions in the i-th bitmap image based on the first copy quantity and the second copy quantity, and obtain a conversion image corresponding to the i-th bitmap image.

[0064] In the aspect of obtaining the image transformation size, the image transformation module comprises:

[0065] The service obtaining unit is configured to obtain a communication session page and obtain service data.

[0066] The size determining unit is configured to determine a spatial width and a display row number of the service data in the communication session page, determine a display size of an information box in the communication session page according to the spatial width and the display row number, and determine the display size of the information box as the image transformation size; the information box is used to display the service data.

[0067] The image generating module comprises:

[0068] The image combining unit is configured to combine the conversion image corresponding to each bitmap image, and obtain a target dynamic image.

[0069] The image display unit is configured to obtain the information box in the communication session page, determine the target dynamic image as a background image in the information box, and display the service data in the information box containing the target dynamic image.

[0070] In the aspect of obtaining the image transformation size, the image transformation module comprises:

[0071] The operation response unit is configured to respond to a stretching operation on the original dynamic image, obtain a stretching width and a stretching height corresponding to the stretching operation, and determine the image transformation size according to the stretching width and the stretching height.

[0072] The image transformation module comprises:

[0073] The instruction obtaining unit is configured to respond to a region transformation instruction on the original dynamic image, obtain a region coverage position and an image transformation size in the region transformation instruction.

[0074] The subgraph obtaining unit is configured to perform size transformation on the image transformation region corresponding to each bitmap image respectively according to the image transformation size, to obtain a covering subgraph corresponding to each bitmap image respectively.

[0075] The image covering unit is configured to add the covering subgraph to the region covering position in the corresponding bitmap image, to obtain a conversion image corresponding to each bitmap image respectively.

[0076] The region determining module is further configured to:

[0077] If the transformation information block does not exist in the image header information, the default transformation region is determined as the image transformation region of each bitmap image.

[0078] The embodiment of the present application provides a computer device, including a processor, a memory;

[0079] The memory is configured to store a computer application program, and the processor is configured to execute the computer application program stored in the memory, to implement the image processing method in the embodiment of the present application.

[0080] The embodiment of the present application provides a computer readable storage medium, which stores a computer application program, and the computer application program includes program instructions, which are executed to implement the image processing method in the embodiment of the present application.

[0081] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional manners in the embodiment of the present application.

[0082] The embodiment of the present application has the following beneficial effects:

[0083] The embodiment of the present application obtains the image header information of the original dynamic image, and obtains at least two bitmap images constituting the original dynamic image. If the transformation information block exists in the image header information, the transformation region information included in the transformation information block is used to determine the image transformation region corresponding to each bitmap image. The image transformation size is obtained, the size transformation is performed on the image transformation region corresponding to each bitmap image according to the image transformation size, and the converted image corresponding to each bitmap image is obtained. The target dynamic image is output according to the converted image corresponding to each bitmap image. The concept of the transformation information block is introduced in the image header information of the original dynamic image, so that the transformation region information can be stored in the transformation information block, so that the original dynamic image can be transformed according to the image transformation region determined by the transformation region information when the stretching transformation is performed, and the transformation region information can be changed as needed, that is, the image transformation region is variable, so that the transformation flexibility of the dynamic image is realized, more dynamic effects are realized, and the image volume and the traffic can be effectively saved. BRIEF DESCRIPTION OF DRAWINGS

[0084] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0085] Figure 1 is a network architecture for image processing provided by the embodiment of the present application;

[0086] Figure 2 is a scene schematic diagram of image processing provided by the embodiment of the present application;

[0087] Figure 3a is an image header information structure schematic diagram without transformation information block provided by the embodiment of the present application;

[0088] Figure 3b is an image header information structure schematic diagram with transformation information block provided by the embodiment of the present application;

[0089] Figure 4 is a method flowchart of image processing provided by the embodiment of the present application;

[0090] Figure 5 is an image transformation schematic diagram in a conversation scene provided by the embodiment of the present application;

[0091] Figure 6 is an image stretching scene schematic diagram provided by the embodiment of the present application;

[0092] Figure 7a is a scene diagram of image transformation provided by an embodiment of the present application;

[0093] Figure 7b is another scene diagram of image transformation provided by an embodiment of the present application;

[0094] Figure 8a is a scene diagram of region transformation provided by an embodiment of the present application;

[0095] Figure 8b is a scene diagram of generating a converted image provided by an embodiment of the present application;

[0096] Figure 9 is a flowchart of an image conversion method provided by an embodiment of the present application;

[0097] Figure 10a is a structure diagram of image header information of a multi-transformation information block provided by an embodiment of the present application;

[0098] Figure 10b is another structure diagram of image header information of a multi-transformation information block provided by an embodiment of the present application;

[0099] Figure 10c is still another structure diagram of image header information of a multi-transformation information block provided by an embodiment of the present application;

[0100] Figure 11 is a scene diagram of generating an original dynamic image provided by an embodiment of the present application;

[0101] Figure 12 is a diagram of an image processing apparatus provided by an embodiment of the present application;

[0102] Figure 13 is a structure diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0103] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0104] Specifically, refer to Figure 1 , Figure 1This is a network architecture diagram for image processing provided in an embodiment of this application. This embodiment can be implemented using a computer device, which may consist of a server and terminal devices; the computer device may also be either a server or a terminal device, and this is not limited thereto. The computer device in this embodiment can be any device with image display capabilities.

[0105] This application's embodiments can be applied to any scenario where dynamic images can be processed, such as communication session scenarios or page design scenarios. Taking a communication session scenario as an example, such as... Figure 1 As shown, each computer device can interact with server 101 to enable communication between them. For example, computer device 102a can send information to computer devices 102b and 102c through server 101, and can also receive information sent by computer devices 102b or 102c through server 101. Optionally, if direct communication is possible between the computer devices, a communication network can be established between computer devices 102a, 102b, and 102c, allowing data interaction between any two devices.

[0106] The user can set the background of the information box during the communication session, and the background is a dynamic image. The dynamic image can be an APNG (Animated Portable Network Graphics). The first frame image of the APNG is a standard PNG image, and other animation and frame speed data included in the APNG are stored in a PNG extension data block. Therefore, an application that only supports the standard PNG can correctly display the first frame image. Assuming that the user corresponds to the computer device 102a, when the computer device 102a sends information to the computer device 102b or the computer device 102c, the original dynamic image can be obtained, the image header information is obtained from the original dynamic image, and based on the transformation information block in the image header information, the image transformation area of each bitmap image constituting the original dynamic image is determined. When the computer device 102a sends information to the computer device 102b, the computer device 102b can be recorded as the communication session object of the computer device 102a. When the computer device 102a sends information to the computer device 102c, the computer device 102c can be recorded as the communication session object of the computer device 102a. The communication session object refers to the computer device that performs the communication session with the computer device 102a. The computer device 102a can determine the image transformation size based on the information to be sent by the computer device 102a, perform size transformation on the image transformation area of each bitmap image according to the image transformation size, to obtain the conversion image corresponding to each bitmap image, generate a target dynamic image according to the conversion image of each bitmap image, display the target dynamic image and the information with the target dynamic image as the background and the information to be sent by the computer device 102a as the foreground. The computer device 102a can also send the target dynamic image and the information to the communication session object through the server 101, so that the communication session object displays the target dynamic image and the information. Since the image header information of the dynamic image can be changed, the transformation information block in the image header information of the dynamic image can be added, deleted or changed as needed. When the dynamic image is transformed, the transformation information block in the dynamic image can be used to transform any region in the dynamic image, thereby improving the flexibility of dynamic image transformation.

[0107] It can be understood that the computer device or user device mentioned in the embodiments of the present application includes but is not limited to terminal device or server. In other words, the computer device or user device can be a server or a terminal device, or a system composed of a server and a terminal device. Among them, the terminal device mentioned above can be an electronic device, including but not limited to mobile phone, tablet computer, desktop computer, notebook computer, palm computer, augmented reality / virtual reality (AR / VR) device, smart television, smart vehicle, head-mounted display, wearable device, smart speaker, digital camera, camera and other mobile internet devices (MID) with network access capability. Among them, the server mentioned above can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN), and big data and artificial intelligence platform, etc. basic cloud computing services.

[0108] Further, please refer to Figure 2 , Figure 2 is a scene schematic diagram of image processing provided by the embodiments of the present application. As Figure 2As shown, the computer device acquires the image header information of the original dynamic image 201, splits the original dynamic image 201, and acquires at least two bitmap images 202 constituting the original dynamic image 201. Taking one of the at least two bitmap images 202 as an example, it is detected whether there is a transformation information block in the image header information of the bitmap image 203. If there is a transformation information block in the image header information of the original dynamic image 201, the image transformation region 2031 corresponding to the bitmap image 203 is determined according to the transformation region information included in the transformation information block. The image transformation size is acquired, which is used to indicate the size of the image transformation region 2031 after transformation. The image transformation region 2031 is subjected to size transformation according to the acquired image transformation size, and the converted image 204 corresponding to the bitmap image 203 is obtained, wherein the image transformation region 2031 is subjected to size transformation, and the part of the bitmap image 203 other than the image transformation region 2031 remains unchanged to obtain the converted image 204, and the image transformation region 2031 corresponds to the region 2041 in the converted image 204. Similarly, the converted images 205 corresponding to the at least two bitmap images 202 respectively can be acquired, and the converted images 205 corresponding to the at least two bitmap images 202 respectively are combined to output the target dynamic image 206. The image format of the target dynamic image 206 is the same as that of the original dynamic image 201, and the image format refers to the format of the image file when stored, such as RAW Image Format (RAW), BitMaP (BMP), Joint Photographic Expert Group (JPEG), or Portable Network Graphics (PNG), etc. The image format of the original dynamic image 201 and the target dynamic image 206 specifically refers to the image format of the dynamic image, such as APNG. The APNG (Animated Portable Network Graphics) is a bitmap animation format based on PNG (Portable Network Graphics), and the extension method is similar to the GIF89a version in the Graphics Interchange Format (GIF) mainly used for web graphics, and the traditional PNG is still downward compatible. The first frame is a standard single PNG image, so the application program supporting the original PNG can normally display the first frame. The remaining animation frames and frame speed data are stored in the extension data block conforming to the original PNG standard. By acquiring the transformation information block in the image header information of the original dynamic image, the image transformation region of the bitmap image in the original dynamic image for transformation is determined based on the transformation region information in the transformation information block.

[0109] Further, the image header information of the original dynamic image can refer to Figure 3a or Figure 3b . Wherein, Figure 3a is a kind of image header information structure diagram of non-transform information block provided by the embodiment of the application, as shown in Figure 3a The image header information of the original dynamic image includes bitmap signature 301a, header file data block 301b, other data block 301c, control framework 301d, image data block 301e, control framework 301f, frame data block 301g and image end block 301h. Wherein, bitmap signature 301a refers to png signature, which is the signature carried in the first frame image in the original dynamic image;Header file data block (IHDR) 301b contains the basic information of the image data stored in the original dynamic image, and must appear as the first data block in the image header information of the original dynamic image, and there can only be one header file data block in the image header information of the original dynamic image, and the basic information contained in the header file data block is used to indicate the basic information of the original dynamic image, such as image width, image height, image depth, color type, compression method, etc.;Other data block 301c includes animation control block (Animation control block, acTL) and the like, which is used to control the animation display of the original dynamic image, must be before the first image data block (image data chunk, IDAT), and is used to inform the parser that the image is a dynamic image, including the total number of animation frames (i.e. the number of at least two bitmap images included in the original dynamic image) and the number of cycles (such as the number of times the at least two bitmap images are displayed cyclically) and the like.

[0110] Further, control framework (control framework, FCTL) 301d is necessary for each frame, appears before IDAT or frame data block (Frame data block, fdAT), and contains sequence number, width and height, frame position and delay time and the like;Image data block (IDAT) 301e is used to store actual data, and can contain multiple continuous sequential image data blocks in the data stream of the original dynamic image, and the IDAT stores the real data information of the image, and png image can be generated according to the IDAT;Control framework 301f is the same as control framework 301d;The structure of frame data block 301g is the same as that of IDAT, except that the sequence number in the corresponding fcTL;Image end block (image trailer chunk, IEND) 301h is used to mark that the original dynamic image file or data stream has ended, and must be placed at the tail of the image header information.

[0111] Among them, the control frame 301f and the frame data block 301g can be repeated n times, where n is a positive integer. n can be the number of bitmap images contained in the original motion picture minus one. In other words, the control frame 301d and the image data block 301e are used to represent the information of the first frame in the original motion picture; the combination of n control frames 301f and frame data blocks 301g is used to represent the information of the frame images other than the first frame in the original motion picture.

[0112] in, Figure 3b This is a schematic diagram of an image header information structure containing transformation information blocks provided in an embodiment of this application, such as... Figure 3b As shown, the image header information of the original dynamic image includes a bitmap signature 302a, a header data block 302b, other data blocks 302c, a control frame 302d, an image data block 302e, a control frame 302f, a frame data block 302g, an image end block 302h, and a transformation information block 302i. The transformation information block 302i can be added to the location of the other data blocks 302c in the image header information to store transformation region information. Optionally, the transformation information block 302i can also store data padding information, etc. This transformation information block can be a Nine Patch Chunk (npTC).

[0113] Among them, the control frame 302f and the frame data block 302g can be repeated n times, where n is a positive integer. n can be the number of bitmap images in the original motion picture minus one. In other words, the control frame 302d and the image data block 302e are used to represent the information of the first frame in the original motion picture; the combination of n control frames 302f and frame data blocks 302g is used to represent the information of the frame images other than the first frame in the original motion picture.

[0114] Among these, computer equipment detects the transformation information block in the image header information of the original dynamic image; if it obtains such... Figure 3a The image header information shown indicates that no transformation information block was obtained in this image header information. The original dynamic image can be transformed according to the default transformation region to generate the target dynamic image; if such a transformation information block is obtained... Figure 3b The image header information shown indicates that there is a transformation information block in the image header information. The original dynamic image can be transformed according to the image transformation area indicated by the transformation information block to generate the target dynamic image.

[0115] Further, please see Figure 4 , Figure 4 This is a flowchart of an image processing method provided in an embodiment of this application. Figure 4 As shown, the image processing procedure includes the following steps:

[0116] In step S401, the image header information of the original dynamic image is acquired, and at least two bitmap images constituting the original dynamic image are acquired.

[0117] In the embodiment of the present application, the computer device acquires a transformation request for the original dynamic image, responds to the transformation request, analyzes the original dynamic image, acquires the image header information of the original dynamic image, splits the original dynamic image, and obtains at least two bitmap images constituting the original dynamic image. The transformation request can be any request for transforming the original dynamic image, in other words, an operation that can cause the original dynamic image to be transformed, which can trigger the transformation request for the original dynamic image.

[0118] For example, the original dynamic image is a conversation background, such as a chat bubble, which can be seen in Figure 5 , Figure 5 is a schematic diagram of image transformation in a conversation scenario provided by the embodiment of the present application. As shown in Figure 5 , in the communication conversation page 501, user A and user B have a conversation, user A inputs service data in the conversation input area 5011, assuming that the service data is "a", the service data is sent to user B, the computer device detects the sending operation of the service data, acquires the conversation background associated with the user A based on the service data sending operation, records the conversation background as an original dynamic image, and generates a transformation request for the original dynamic image. The association relationship between the conversation background and the user can be stored in the local storage space of the computer device, or can be stored in a server, which can be a physical server or a cloud server, etc., which is not limited here. If the association relationship between the conversation background and the user is stored in the server, the computer device acquires the conversation background associated with user A from the server based on the service data sending operation, records the conversation background as an original dynamic image, and generates a transformation request for the original dynamic image.

[0119] The computer device splits the original dynamic image based on the transformation request, acquires at least two bitmap images constituting the original dynamic image, and specifically, the computer device can analyze the image header information of the original dynamic image, and acquire at least two bitmap images constituting the original dynamic image based on the image header information. For example, as shown in Figure 3a , the computer device can generate a first bitmap image according to the control framework 301d and the image data block 301e in the image header information, and generate other bitmap images constituting the original dynamic image in turn according to the combination of n control frameworks 301f and frame data blocks 301g.

[0120] For example, the user can perform a zoom operation 6011 on the original dynamic image 601, and the computer device detects the zoom operation 6011. In response to the zoom operation 6011 on the original dynamic image 601, the computer device parses the original dynamic image 601, obtains the image header information of the original dynamic image 601, and obtains at least two bitmap images constituting the original dynamic image 601.

[0121] In step S402, if the transformation information block exists in the image header information, the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block.

[0122] In the embodiment of the present application, the computer device obtains the transformation information block from the image header information. If the transformation information block does not exist in the image header information, the default transformation region is determined as the image transformation region of each bitmap image. If the transformation information block exists in the image header information, the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block. The image header information can include at least one transformation information block. When the image header information includes one transformation information block, the transformation information position of the transformation information block in the image header information is obtained. If the transformation information position belongs to the position of other data blocks (i.e., the integrated information storage position of the original dynamic image), the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block. If the transformation information position belongs to the position of the information of one bitmap image (which can be referred to as a bitmap information position) of the at least two bitmap images, the image transformation region of the bitmap image corresponding to the transformation information position is determined according to the transformation region information included in the transformation information block, and the default transformation region is determined as the image transformation region of the other bitmap image.

[0123] For example, the user can perform a zoom operation 6011 on the original dynamic image 601, and the computer device detects the zoom operation 6011. In response to the zoom operation 6011 on the original dynamic image 601, the computer device parses the original dynamic image 601, obtains the image header information of the original dynamic image 601, and obtains at least two bitmap images constituting the original dynamic image 601. Figure 7a , Figure 7a is a schematic diagram of an image transformation scene provided by an embodiment of the present application. As shown in Figure 7aAs shown, an original motion picture 701 is acquired, and its image header information is obtained. This image header information is assumed to include a bitmap signature 702a, a header data block 702b, other data blocks 702c, a control frame 702d, an image data block 702e, a control frame 7021f, a frame data block 7021g, a control frame 7022f, a frame data block 7022g, an image end block 702h, and a transformation information block 702i. The computer device generates a first frame bitmap image 7031 in the original motion picture 701 based on the control frame 702d and the image data block 702e; a second frame bitmap image 7032 in the original motion picture 701 based on the control frame 7021f and the frame data block 7021g; and a third frame bitmap image 7033 in the original motion picture 701 based on the control frame 7022f and the frame data block 7022g. A transformation information block 702i is detected in the image header information. The transformation information position of the transformation information block 702i in the image header information is obtained. It is determined that this transformation information position belongs to the location of other data blocks 702c. Then, based on the transformation information block 702i, the image transformation regions of the first frame bitmap image 7031, the second frame bitmap image 7032, and the third frame bitmap image 7033 are determined. The image transformation region of the first frame bitmap image 7031 is transformed to obtain the transformed image 7041. The image transformation region of the second frame bitmap image 7032 is transformed to obtain the transformed image 7042. The image transformation region of the third frame bitmap image 7033 is transformed to obtain the transformed image 7043. The transformed images 7041, 7042, and 7043 are combined to generate the target dynamic image 705.

[0124] Among them, see Figure 7b , Figure 7b This is a schematic diagram of another image transformation scene provided in an embodiment of this application. For example... Figure 7bAs shown, the original dynamic image 701b is acquired, the image header information of the original dynamic image 701b is acquired, and it is assumed that the image header information includes a bitmap signature 707a, a header data block 707b, other data blocks 707c, a control framework 707d, an image data block 707e, a control framework 7071f, a frame data block 7071g, a control framework 7072f, a frame data block 7072g, an image end block 707h, and a transformation information block 707i. The computer device generates a first frame bitmap image 7081 in the original dynamic image 701 according to the control framework 707d and the image data block 707e, generates a second frame bitmap image 7082 in the original dynamic image 701 according to the control framework 7071f and the frame data block 7071g, and generates a third frame bitmap image 7083 in the original dynamic image 701 according to the control framework 7072f and the frame data block 7072g. It is detected that the transformation information block 707i exists in the image header information, the transformation information position of the transformation information block 707i in the image header information is acquired, and it is acquired that the transformation information position belongs to the second frame bitmap image 7082. Then, the image transformation region of the second frame bitmap image 7082 is determined according to the transformation information block 707i, and the default transformation region is determined as the image transformation region of the first frame bitmap image 7081 and the third frame bitmap image 7083. The image transformation region of the first frame bitmap image 7081 is transformed to obtain a transformed image 7091, the image transformation region of the second frame bitmap image 7082 is transformed to obtain a transformed image 7092, and the image transformation region of the third frame bitmap image 7083 is transformed to obtain a transformed image 7093. The transformed image 7091, the transformed image 7092, and the transformed image 7093 are combined to generate a target dynamic image 70.

[0125] When the image header information includes at least two transformation information blocks, the respective transformed images corresponding to the bitmap images can be determined according to the at least two transformation information blocks. It is assumed that the transformation information blocks include a first transformation information block and a second transformation information block, and the i-th bitmap image in the at least two bitmap images corresponds to the first transformation information block; i is a positive integer, and i is less than the number of bitmap images included in the at least two bitmap images. If the second transformation information block corresponding to the (i+1)-th bitmap image does not exist in the image header information, the image transformation region of the (i+1)-th bitmap image is determined according to the first transformation information block corresponding to the i-th bitmap image; if the second transformation information block corresponding to the (i+1)-th bitmap image exists in the image header information, the image transformation region of the (i+1)-th bitmap image is determined according to the second transformation information block, or the default transformation region is determined as the image transformation region of the (i+1)-th bitmap image.

[0126] In step S403, the image transformation size is obtained, and the size of the image transformation region corresponding to each bitmap image is transformed according to the image transformation size, to obtain a converted image corresponding to each bitmap image.

[0127] In the embodiment of the present application, the computer device can obtain an image transformation size, which is used to represent the size of a region obtained after the image transformation region is transformed. The computer device obtains a region transformation mode of the i th bitmap image, and transforms the image transformation region corresponding to the i th bitmap image according to the image transformation size and the region transformation mode, to obtain a converted image corresponding to the i th bitmap image; i is a positive integer, and i is less than or equal to the number of bitmap images included in the at least two bitmap images. The region transformation mode of each bitmap image can be stored in the image header information of the original dynamic image.

[0128] The region transformation mode of the i th bitmap image can be a stretching transformation mode. The specific description is as follows:

[0129] When the image transformation region corresponding to the i th bitmap image is transformed, the computer device can obtain a wide spacing and a high spacing in the data padding information (i.e., pading information) of the original dynamic image. The wide spacing refers to the spacing in width between the service data and the frame of the original dynamic image when the service data is displayed in the original dynamic image, and the high spacing refers to the spacing in height between the service data and the frame of the original dynamic image when the service data is displayed in the original dynamic image. The computer device can determine the predicted width and the predicted height of the image transformation region corresponding to the i th bitmap image according to the wide spacing, the high spacing, and the image transformation size. Specifically, the computer device determines the region required to be reserved for each frame of bitmap image in the original dynamic image according to the image transformation size, and obtains the predicted width and the predicted height of the region obtained by transforming the image transformation region when the distance between the reserved region and the high frame of the original dynamic image is the wide spacing, and the distance between the reserved region and the wide frame of the original dynamic image is the high spacing.

[0130] The computer device stretches the width of the image transformation region corresponding to the i th bitmap image to the predicted width by using the stretching transformation mode, and stretches the height of the image transformation region corresponding to the i th bitmap image to the predicted height, to obtain a converted image corresponding to the i th bitmap image. In the converted image corresponding to the i th bitmap image, the distance between the region in which the service data can be displayed and the high frame of the converted image is the wide spacing, and the distance between the region in which the service data can be displayed and the wide frame of the converted image is the high spacing. The i th bitmap image can represent any one of the at least two bitmap images. The converted image of each bitmap image is obtained by referring to the process of obtaining the converted image of the i th bitmap image.

[0131] Optionally, the region transformation mode of the i-th bitmap image can be a copy transformation mode. The specific description is as follows:

[0132] The computer device can determine a predicted width and a predicted height of the image transformation region corresponding to the i-th bitmap image according to the image transformation size. The computer device can obtain a region width and a region height of the image transformation region corresponding to the i-th bitmap image, determine a first copy number of the image transformation region according to the predicted width and the region width, and determine a second copy number of the image transformation region according to the predicted height and the region height. The first copy number is used to represent the number of the image transformation region corresponding to the i-th bitmap image that needs to be copied in the width direction of the i-th bitmap image, and the second copy number is used to represent the number of the image transformation region corresponding to the i-th bitmap image that needs to be copied in the height direction of the i-th bitmap image. The first copy number can be considered as a ratio of the predicted width to the region width, and the second copy number can be considered as a ratio of the predicted height to the region height.

[0133] Further, the computer device can determine a predicted copy number according to the first copy number and the second copy number, copy the image transformation region corresponding to the i-th bitmap image by using the copy transformation mode, and obtain k image transformation regions. k is the predicted copy number, and k can be a positive integer or a decimal number. The computer device can arrange and splice the k image transformation regions in the i-th bitmap image based on the first copy number and the second copy number, and obtain a conversion image corresponding to the i-th bitmap image. For example, assuming that the first copy number is 5 and the second copy number is 2, k is 10, the computer device can copy the image transformation region corresponding to the i-th bitmap image to obtain 10 image transformation regions, arrange the 10 image transformation regions into 2 rows and 5 columns, and splice the arranged image transformation regions and other parts in the i-th bitmap image to obtain the conversion image corresponding to the i-th bitmap image. For example, assuming that the first copy number is 1.5 and the second copy number is 2, k is (1.5*2), the computer device can copy the image transformation region corresponding to the i-th bitmap image to obtain 2 image transformation regions and 2 image transformation regions each having a half size.

[0134] For example, the region transformation mode of the i-th bitmap image can be a copy transformation mode. Figure 8a , Figure 8a is a region transformation schematic diagram provided by an embodiment of the present application. As shown in Figure 8aAs shown in FIG. 8, the bitmap image 801 is taken as an example. The bitmap image 801 corresponds to an image transformation region 8011. The wide interval d1 and the high interval d2 are obtained from the data filling information of the original dynamic image, the image transformation size is obtained, and the predicted width and the predicted height are determined based on the wide interval d1, the high interval d2 and the image transformation size. If the region transformation manner of the bitmap image 801 is the stretching transformation manner, the size of the image transformation region 8011 in the w direction is stretched to the predicted width, and the size in the h direction is stretched to the predicted height, to obtain a converted region 8021. If the region transformation manner of the bitmap image 801 is the copying transformation manner, the image transformation region 8011 is copied, and the converted regions obtained by copying are arranged and spliced to obtain a converted region 8022. The converted image 803 of the bitmap image 801 is obtained according to the converted region 802 (such as the converted region 8021 or the converted region 8022).

[0135] If the image transformation region includes a part of the frame corresponding to the bitmap image, the image transformation region is subjected to the size transformation, the part of the bitmap image other than the image transformation region is not subjected to the transformation, and the converted image of the bitmap image is obtained. If the image transformation region does not include the frame corresponding to the bitmap image, the image transformation region is subjected to the size transformation, and the frame of the bitmap image is adaptively adjusted to obtain the converted image of the bitmap image.

[0136] Referring to FIG. 8, Figure 8b , Figure 8b is a schematic diagram of a generation scene of a converted image provided by an embodiment of the present application. As shown in FIG. 8, Figure 8b the image transformation region 805 in the bitmap image 804 is obtained, the image transformation region 805 is subjected to the transformation to obtain a converted region 806, the frame of the bitmap image 804 is adaptively adjusted based on the converted region 806, and the converted image 807 of the bitmap image 804 is obtained.

[0137] In the process of obtaining the image transformation size, the following method can be used to obtain the image transformation size.

[0138] In an embodiment of the present application, an image transformation size obtaining method is provided. The computer device can obtain a communication session page and obtain service data. The spatial width and the display number of lines of the service data in the communication session page are determined, the display size of the information box in the communication session page is determined according to the spatial width and the display number of lines, and the display size of the information box is determined as the image transformation size. The information box is used to display the service data. As shown in FIG. 9, Figure 5As shown, the computer device acquires the communication session page 501, acquires the service data "a", acquires the font information of the service data "a", including the font and font size used when the service data is displayed. The computer device can acquire the space width of the area in the communication session page 501 that can be used to display the service data, determine the display number of the service data "a" based on the font information of the service data "a" and the space width, determine the display size of the information box in the communication session page 501 through the display number and the space width, and determine the display size of the information box as the image transformation size.

[0139] A way of acquiring an image transformation size, the computer device can respond to a zoom operation on an original dynamic image, acquire a zoom width and a zoom height corresponding to the zoom operation, and determine the image transformation size according to the zoom width and the zoom height. For details, please refer to Figure 6 , Figure 6 is a schematic diagram of an image stretching scenario provided by an embodiment of the present application, as Figure 6 shown, in response to a zoom operation 6011 on an original dynamic image 601, assuming that the zoom operation 6011 is stretched from a position 6031 to a position 6032, the distance of the zoom operation 6011 in the x direction is acquired as the zoom width, the distance of the zoom operation 6011 in the y direction is acquired as the zoom height, and the image transformation size is determined according to the zoom width and the zoom height. Based on the image transformation size, the image transformation region in each bitmap image is size transformed to obtain a converted image 604 corresponding to each bitmap image respectively.

[0140] Further, the computer device can acquire the region covering position and the image transformation size in the region transformation instruction in response to the region transformation instruction for the original dynamic image. The region transformation instruction can be an instruction for transforming the image transformation region, such as a rotation instruction, a translation instruction, or a tiling instruction, without limitation. The computer device can perform size transformation on the image transformation region corresponding to each bitmap image respectively according to the image transformation size, to obtain a covering sub-image corresponding to each bitmap image respectively. The covering sub-image is added to the region covering position in the corresponding bitmap image, to obtain a transformed image corresponding to each bitmap image respectively. For example, the region transformation instruction is a rotation instruction, which is used to instruct the image transformation region to be rotated by 360 degrees at an angle of 90 degrees. The region covering position is determined as the position of the image transformation region after being rotated by 90 degrees, 180 degrees, and 270 degrees, sequentially recorded as a first region covering position, a second region covering position, and a third region covering position. The image transformation size is {(360 degrees / 90)*size of the image transformation region}. Taking the i-th bitmap image as an example, the computer device can copy the image transformation region in the i-th bitmap image to obtain four image transformation regions based on the image transformation size. One image transformation region is unchanged, the image transformation region is rotated by 90 degrees, and the rotated image transformation region is added to the first region covering position. One image transformation region is rotated by 180 degrees, and the rotated image transformation region is added to the second region covering position. One image transformation region is rotated by 270 degrees, and the rotated image transformation region is added to the third region covering position, to obtain the transformed image of the i-th bitmap image.

[0141] In step S404, the target dynamic image is output according to the transformed image corresponding to each bitmap image respectively.

[0142] In the embodiment of the present application, the computer device can combine the transformed image corresponding to each bitmap image respectively to obtain the target dynamic image. When the target dynamic image is displayed on the communication session page, the computer device can acquire the information box in the communication session page, determine the target dynamic image as the background image in the information box, and display the service data in the information box containing the target dynamic image. As shown in FIG. 5, after the original dynamic image 502 is transformed into the target dynamic image 503, the target dynamic image 503 is taken as the background image of the information box, the service data “a” is displayed in the information box containing the target dynamic image 503, the information box containing the target dynamic image 503 and the service data is recorded as a session message, and the display effect is as shown in the session message 504 displayed in the communication session page in FIG. 6. Figure 5 Figure 5 When a scaling operation is performed on the original dynamic image, as shown in FIG. 7, the computer device can acquire the scaling instruction, and perform size transformation on the image transformation region corresponding to each bitmap image respectively according to the scaling instruction, to obtain a transformed image corresponding to each bitmap image respectively. For example, the scaling instruction is a scaling instruction for scaling the image transformation region by 50%, and the image transformation size is {(100%-50%) / 100%*size of the image transformation region}. Taking the i-th bitmap image as an example, the computer device can copy the image transformation region in the i-th bitmap image to obtain two image transformation regions based on the image transformation size. One image transformation region is unchanged, and the image transformation region is scaled by 50%, to obtain the transformed image of the i-th bitmap image.

[0143] Figure 6 ​​As shown, according to the conversion image 604 of each bitmap image, the target dynamic image 605 can be generated and directly displayed in the page displaying the original dynamic image 601.

[0144] In the embodiment of the present application, the computer device acquires the image header information of the original dynamic image and acquires at least two bitmap images constituting the original dynamic image. If there is a transformation information block in the image header information, the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block. The image transformation size is acquired, the image transformation region corresponding to each bitmap image is size-transformed according to the image transformation size, and the conversion image corresponding to each bitmap image is obtained. The target dynamic image is output according to the conversion image corresponding to each bitmap image. The concept of the transformation information block is introduced in the image header information of the original dynamic image, so that the transformation region information can be stored in the transformation information block, so that the original dynamic image can be transformed according to the image transformation region determined by the transformation region information when stretching transformation and the like is performed, and the transformation region information can be changed as needed, that is, the image transformation region is variable, so that the transformation flexibility of the dynamic image is realized, and more dynamic effects are achieved. Moreover, under the same animation effect, the resources occupied by the APNG are smaller, the space size occupied by the dynamic image can be reduced, the traffic required when the original dynamic image is acquired can be reduced, and the download efficiency is improved.

[0145] Further, please refer to Figure 9 , Figure 9 is a flow chart of an image conversion method provided by the embodiment of the present application. As shown in Figure 9 , the process can include the following steps:

[0146] Step S901, the image header information of the original dynamic image is parsed.

[0147] In the embodiment of the present application, the computer device parses the image header information of the original dynamic image, and the structure of the image header information can be referred to Figure 3a , 3b , 7a and 7b and the like.

[0148] Step S902, at least two bitmap images constituting the original dynamic image are decoded frame by frame.

[0149] Step S903, i = 1.

[0150] In the embodiment of the present application, the variable i is set, and i is used to represent the position in the at least two bitmap images.

[0151] Step S904, whether there is a transformation information block.

[0152] In the embodiment of the present application, the computer device detects whether the transformation information block of the i-th bitmap image exists in the image header information. If the transformation information block of the i-th bitmap image exists, step S905 is executed; if the transformation information block of the i-th bitmap image does not exist, step S906 is executed.

[0153] In step S905, the conversion image of the i-th bitmap image is obtained based on the transformation information block.

[0154] In the embodiment of the present application, the computer device determines the image transformation region of the i-th bitmap image based on the transformation information block, transforms the image transformation region of the i-th bitmap image, and obtains the conversion image of the i-th bitmap image. The process can be referred to the specific description shown in steps S402 and S403 of Figure 4

[0155] In step S906, the conversion image of the i-th bitmap image is obtained according to the default transformation region.

[0156] In the embodiment of the present application, the computer device determines the image transformation region of the i-th bitmap image as the default transformation region, transforms the image transformation region of the i-th bitmap image, and obtains the conversion image of the i-th bitmap image. The transformation process of the image transformation region of the i-th bitmap image can be referred to the specific description shown in step S403 of Figure 4

[0157] In step S907, whether i is the number of bitmap images.

[0158] In the embodiment of the present application, the number of bitmap images refers to the number of bitmap images included in the at least two bitmap images constituting the original dynamic image. If i is the number of bitmap images, it means that the transformation of the at least two bitmap images is completed, and step S909 is executed; if i is not the number of bitmap images, it means that there are still some bitmap images that have not been transformed, and step S908 is executed.

[0159] In step S908, i=i+1.

[0160] In the embodiment of the present application, the value of i is increased by one, which means that the next bitmap image is processed, and step S904 is executed.

[0161] In step S909, the conversion image in the target dynamic image is displayed frame by frame.

[0162] In the embodiment of the present application, the computer device can generate the target dynamic image according to the obtained conversion image, and can display the conversion image in the target dynamic image frame by frame, so as to realize the dynamic display of the target dynamic image.

[0163] Further, the structure of the image header information can also be referred to​​Figure 10a to Figure 10c , Figure 10a to Figure 10c refers to image header information including multiple transformation information blocks.

[0164] Specifically, refer to Figure 10a to Figure 10c , Figure 10a is a kind of image header information structure schematic diagram of multiple transformation information blocks provided by the embodiment of the application. As Figure 10a shown, the image header information includes bitmap signature 101a, header file data block 101b, other data block 101c, control framework 101d, image data block 101e, control framework 101f, frame data block 101g, image end block 101h and transformation information block 101i. Wherein, the image header information includes n sets of control framework 101f and frame data block 101g; The transformation information block 101i includes m transformation information blocks, such as transformation information block 1011i, transformation information block 1012i,..., and transformation information block 101mi, wherein m is a positive integer, m is less than or equal to (n-1). Optionally, each transformation information block can include image number and transformation region information, etc., the image number is used to indicate the corresponding bitmap image in at least two bitmap images of the transformation information block, for example, the image number is 3, and the transformation information block with image number 3 can represent the transformation information block of the third frame bitmap image in at least two bitmap images.

[0165] wherein, Figure 10b is another kind of image header information structure schematic diagram of multiple transformation information blocks provided by the embodiment of the application. As Figure 10b shown, the image header information includes bitmap signature 102a, header file data block 102b, other data block 102c, control framework 102d, image data block 102e, control framework 102f, frame data block 102g and image end block 102h, wherein the image header information includes n sets of control framework 102f and frame data block 102g. Wherein, the control framework 102d and image data block 102e can include transformation information block, for indicating the transformation information block of the first frame bitmap image in at least two bitmap images; Each of the n sets of control framework 102f and frame data block 102g can include transformation information block. As Figure 8b , the n sets of control framework 102f and frame data block 102g include control framework 1021f, frame data block 1021g, control framework 1022f, frame data block 1022g, transformation information block 1022i,..., control framework 102nf, frame data block 102ng and transformation information block 102ni, indicating that the third frame bitmap image,..., and the (n+1) frame bitmap image include transformation information block.

[0166] wherein, if the structure of image header information is Figure 10aor Figure 10b The structure shown allows us to determine the image transformation region of a bitmap image when it lacks a transformation information block. This transformation region can be determined based on adjacent frames or by using a default transformation region. For example, if there are five bitmap images, and the first, fourth, and fifth frames contain transformation information blocks, the image transformation regions of the second and third frames can be obtained from the transformation information block of the first frame or by using a default transformation region. If the first frame is not present in the image header information, the default transformation region is used to determine the image transformation region of the first frame.

[0167] in, Figure 10c This is a schematic diagram of another image header information structure with multiple transformation information blocks provided in an embodiment of this application. For example... Figure 10c As shown, the image header information includes a bitmap signature 103a, a header data block 103b, other data blocks 103c, a control frame 103d, an image data block 103e, a control frame 103f, a frame data block 103g, an image end block 103h, and a transformation information block 103i. The image header information includes n sets of control frames 103f and frame data blocks 103g. These n sets of control frames 103f and frame data blocks 103g may include: control frame 1031f, frame data block 1031g, control frame 1032f, frame data block 1032g, transformation information block 1032i, ..., control frame 103nf, frame data block 103ng, and transformation information block 103ni, indicating that the third frame bitmap image, ..., and the (n+1)th frame bitmap image include transformation information blocks. If the i-th bitmap image has a corresponding transformation information block, the image transformation region of the i-th bitmap image is determined according to the transformation information block; if the i-th bitmap image does not have a corresponding transformation information block, the image transformation region of the i-th bitmap image is determined according to the spare transformation information block (i.e., transformation information block 103i). The spare transformation information block refers to the transformation information block included in describing the comprehensive information of the original dynamic image.

[0168] Further, please see Figure 11 , Figure 11 This is a schematic diagram of an original dynamic image generation scene provided by an embodiment of this application, namely, acquiring at least two bitmap images and composing the at least two bitmap images into an original dynamic image. Figure 11As shown, there are three bitmap images, namely, "first frame.png, second frame.png and third frame.png", wherein the first frame bitmap image includes bitmap signature 111a, header data block 111b, image data block 111e and image end block 111h, etc.; the second frame bitmap image includes bitmap signature 112a, header data block 112b, image data block 112e and image end block 112h, etc.; and the third frame bitmap image includes bitmap signature 113a, header data block 113b, image data block 113e and image end block 113h, etc. Image data block 114e is obtained according to image data block 111e in the first frame bitmap image, and control framework 114d is generated based on the first frame bitmap image; frame data block 1141g is obtained according to image data block 112e in the second frame bitmap image, and control framework 1141f is generated based on the second frame bitmap image; and frame data block 1142g is obtained according to image data block 113e in the third frame bitmap image, and control framework 1142 is generated based on the third frame bitmap image. The image header information of the base dynamic image generated according to the first frame bitmap image, the second frame bitmap image and the third frame bitmap image includes bitmap signature 114a, header data block 114b, other data block 114c, control framework 114d, image data block 114e, control framework 1141f, frame data block 1141g, control framework 1142f, frame data block 1142g and image end block 114h.

[0169] Wherein, the point nine data block (npTC) is obtained from the first frame bitmap image, the second frame bitmap image and the third frame bitmap image, and is added to the image header information of the base dynamic image as the transformation information block to generate the original dynamic image, wherein, the point nine data block can be added to other data block 114c; or, the bitmap image to which the point nine data block belongs is obtained, and the transformation information block is added to the information corresponding to the bitmap image to which the point nine data block belongs, for example, the point nine data block belongs to the second frame bitmap image, and the transformation information block is added to control framework 1141f and frame data block 1141g. Alternatively, the transformation configuration file of the base dynamic image can be obtained, the transformation region information is obtained from the transformation configuration file, the transformation information block is generated according to the transformation region information, and the transformation information block is added to the image header information of the base dynamic image based on the transformation configuration file to generate the original dynamic image, wherein, the configuration file can include transformation region information, frame image corresponding to the transformation region information and position in the image header information, etc.

[0170] Wherein, Figure 11 The generation process of the original dynamic image described in the foregoing embodiments and the image processing process (such as Figure 4 ) in the embodiments of the present application can be implemented by different computer devices or by the same computer device.

[0171] In the embodiment of the present application, the nine patch is also called nine graph, which is a picture in png format, and its suffix is ".9.png". The difference between the nine graph and the traditional png picture is that the nine graph has a 1-pixel-wide and 1-pixel-high area around the edge of the nine graph, and can only be filled with two colors, transparent (#00000000) and black (#FF000000), which are used to define the expansion area and the filling area of the picture. The nine graph can include a nine patch chunk (npTC). When the original dynamic picture is generated, the at least two bitmap images constituting the original dynamic picture can include the nine graph. When the image header file of the original dynamic picture is generated according to the at least two bitmap images, the nine patch chunk can be obtained from the nine graph, the transformation information block is generated according to the nine patch chunk, and the transformation information block is added to the image header file of the original dynamic picture, so that the APNG and the nine graph can be fused, and the component supporting the nine graph of the APNG can be realized. At the same time, the change of the image header file of the original dynamic picture makes the information of the nine graph carried in the structure of the image header file of the original dynamic picture, so that the static png nine graph of the Android operating system can be supported by the iOS of the Apple mobile operating system, and the dynamic apng nine graph can also be supported.

[0172] Further, please refer to Figure 12 , Figure 12 is a schematic diagram of an image processing device provided by an embodiment of the present application. The image processing device can be a computer program (including program code) running in a computer device, for example, the image processing device is an application software; the device can be used to execute the corresponding steps in the method provided by the embodiments of the present application. As shown in Figure 12 , the image processing device 1200 can be used in the computer device in the embodiments corresponding to Figure 4 , specifically, the device can include: an information obtaining module 11, a region determining module 12, an image transformation module 13, and an image generating module 14.

[0173] The information obtaining module 11 is configured to obtain image header information of an original dynamic picture, and obtain at least two bitmap images constituting the original dynamic picture.

[0174] The region determining module 12 is configured to, if the transformation information block exists in the image header information, determine the image transformation region corresponding to each bitmap image according to the transformation region information included in the transformation information block.

[0175] The image transformation module 13 is configured to obtain an image transformation size, perform size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size, and obtain a converted image corresponding to each bitmap image.

[0176] The image generation module 14 is configured to output the target dynamic image according to the conversion image corresponding to each of the bitmap images.

[0177] The transformation information block includes a first transformation information block and a second transformation information block; the i-th bitmap image corresponds to the first transformation information block; i is a positive integer, and i is less than the number of bitmap images included in the at least two bitmap images.

[0178] The region determination module 12 includes:

[0179] The region acquisition unit 121 is configured to determine the image transformation region of the (i+1)-th bitmap image according to the first transformation information block corresponding to the i-th bitmap image if the second transformation information block corresponding to the (i+1)-th bitmap image does not exist in the image header information.

[0180] The region acquisition unit 121 is further configured to determine the image transformation region of the (i+1)-th bitmap image according to the second transformation information block if the second transformation information block corresponding to the (i+1)-th bitmap image exists in the image header information.

[0181] The image transformation module 13 includes:

[0182] The size acquisition unit 131 is configured to acquire the image transformation size.

[0183] The region transformation unit 132 is configured to acquire a region transformation manner of the i-th bitmap image, transform the image transformation region corresponding to the i-th bitmap image in the region transformation manner according to the image transformation size, and obtain the conversion image corresponding to the i-th bitmap image; i is a positive integer, and i is less than or equal to the number of bitmap images included in the at least two bitmap images.

[0184] The region transformation manner of the i-th bitmap image is a stretching transformation manner.

[0185] In the aspect of transforming the image transformation region corresponding to the i-th bitmap image in the region transformation manner according to the image transformation size to obtain the conversion image corresponding to the i-th bitmap image, the region transformation unit 132 includes:

[0186] The interval acquisition sub-unit 1321 is configured to acquire a width interval and a height interval in the data padding information of the original dynamic image.

[0187] The size prediction sub-unit 1322 is configured to determine a predicted width and a predicted height of the image transformation region corresponding to the i-th bitmap image according to the width interval, the height interval, and the image transformation size.

[0188] The region stretching sub-unit 1323 is configured to stretch the width of the image transformation region corresponding to the i-th bitmap image to a predicted width and stretch the height of the image transformation region corresponding to the i-th bitmap image to a predicted height by a stretching transformation manner, to obtain a converted image corresponding to the i-th bitmap image.

[0189] The region transformation manner of the i-th bitmap image is a copy transformation manner.

[0190] The region transformation unit 132 includes the following in the aspect of transforming the image transformation region corresponding to the i-th bitmap image in the region transformation manner according to the image transformation size to obtain a converted image corresponding to the i-th bitmap image.

[0191] The size determination sub-unit 1324 is configured to determine the predicted width and the predicted height of the image transformation region corresponding to the i-th bitmap image according to the image transformation size.

[0192] The number acquisition sub-unit 1325 is configured to acquire the region width and the region height of the image transformation region corresponding to the i-th bitmap image, determine a first copy number of the image transformation region according to the predicted width and the region width, and determine a second copy number of the image transformation region according to the predicted height and the region height.

[0193] The region copying sub-unit 1326 is configured to determine a predicted copy number according to the first copy number and the second copy number, and copy the image transformation region corresponding to the i-th bitmap image by the copy transformation manner to obtain k image transformation regions; k is the predicted copy number.

[0194] The region splicing sub-unit 1327 is configured to arrange and splice the k image transformation regions in the i-th bitmap image based on the first copy number and the second copy number to obtain a converted image corresponding to the i-th bitmap image.

[0195] The image transformation module 13 includes the following in the aspect of acquiring the image transformation size.

[0196] The service acquisition unit 133 is configured to acquire a communication session page and acquire service data.

[0197] The size determination unit 134 is configured to determine the spatial width and the display number of rows of the service data in the communication session page, determine the display size of an information box in the communication session page according to the spatial width and the display number of rows, and determine the display size of the information box as the image transformation size; the information box is configured to display the service data.

[0198] The image generation module 14 includes the following.

[0199] The image combination unit 141 is configured to combine the converted image corresponding to each bitmap image to obtain a target dynamic image.

[0200] The image display unit 142 is configured to acquire the information box in the communication session page, determine the target dynamic image as the background image in the information box, and display the service data in the information box containing the target dynamic image.

[0201] The image transformation module 13 is configured to acquire the image transformation size in the following manners.

[0202] The operation response unit 135 is configured to acquire the scaling width and the scaling height corresponding to the scaling operation in response to the scaling operation on the original dynamic image, and determine the image transformation size according to the scaling width and the scaling height.

[0203] The image transformation module 13 is configured to acquire the image transformation size in the following manners.

[0204] The instruction acquisition unit 136 is configured to acquire the region covering position and the image transformation size in the region transformation instruction in response to the region transformation instruction on the original dynamic image.

[0205] The sub-image acquisition unit 137 is configured to perform size transformation on the image transformation region corresponding to each bitmap image respectively according to the image transformation size, and obtain the covering sub-image corresponding to each bitmap image respectively.

[0206] The image covering unit 138 is configured to add the covering sub-image to the region covering position in the corresponding bitmap image, and obtain the transformed image corresponding to each bitmap image respectively.

[0207] The region determination module 12 is further configured to:

[0208] If the transformation information block does not exist in the image header information, the default transformation region is determined as the image transformation region of each bitmap image.

[0209] The embodiment of the present application provides a kind of image processing device, the device obtains the image header information of original dynamic image, obtains at least two bitmap images of original dynamic image composition;If there is transformation information block in image header information, then according to the transformation area information included in transformation information block, determine the image transformation area corresponding to each bitmap image respectively;Image transformation size is obtained, and the size transformation of image transformation area corresponding to each bitmap image respectively is carried out according to image transformation size, and the conversion image corresponding to each bitmap image respectively is obtained;According to the conversion image corresponding to each bitmap image respectively, output target dynamic image.The concept of transformation information block is introduced in the image header information in original dynamic image, so that transformation area information can be stored in the transformation information block, so that the original dynamic image can be transformed according to the image transformation area determined by transformation area information when stretching transformation is carried out, and transformation area information can be changed as needed, i.e.

[0210] Reference is made to Figure 13 , Figure 13 It is a kind of structural schematic diagram of computer equipment provided by the embodiment of the present application.As shown in Figure 13 The computer equipment in the embodiment of the present application can include one or more processors 1301, memory 1302 and input output interface 1303.The processor 1301, memory 1302 and input output interface 1303 are connected by bus 1304.Memory 1302 is used to store computer application, and the computer application includes program instruction, and input output interface 1303 is used to receive data and output data, such as can be used to receive original dynamic image associated with the user of local terminal from server, or, output target dynamic image generated after transformation of original dynamic image;Processor 1301 is used to execute the program instruction stored in memory 1302, and executes the following operations:

[0211] Obtain the image header information of original dynamic image, obtain at least two bitmap images of original dynamic image composition;

[0212] If there is transformation information block in image header information, then according to the transformation area information included in transformation information block, determine the image transformation area corresponding to each bitmap image respectively;

[0213] Image transformation size is obtained, and the size transformation of image transformation area corresponding to each bitmap image respectively is carried out according to image transformation size, and the conversion image corresponding to each bitmap image respectively is obtained;

[0214] According to the conversion image corresponding to each bitmap image, the target dynamic image is output.

[0215] In some possible implementations, the processor 1301 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, or the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0216] The memory 1302 can include a read-only memory and a random access memory, and provide instructions and data for the processor 1301 and the input output interface 1303. A part of the memory 1302 can further include a non-volatile random access memory. For example, the memory 1302 can further store device type information.

[0217] In specific implementations, the computer device can execute the implementation manners provided in the steps of the method 1000 by using the built-in function modules of the computer device. Figure 4 For details, refer to the implementation manners provided in the steps of the method 1000, which will not be described herein. Figure 4

[0218] Embodiments of the present application provide a computer device, which includes a processor, an input output interface, and a memory. The computer device acquires computer instructions in the memory by using the processor, executes the computer instructions, and performs the implementation manners provided in the steps of the method 1000. Figure 4 ​The image processing operation is performed in each step of the method shown in the method. The embodiment of the present application acquires the image header information of the original dynamic image, acquires at least two bitmap images constituting the original dynamic image; if the transformation information block exists in the image header information, the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block; the image transformation size is acquired, the size transformation of the image transformation region corresponding to each bitmap image is performed according to the image transformation size, and the conversion image corresponding to each bitmap image is obtained; and the target dynamic image is output according to the conversion image corresponding to each bitmap image. The concept of the transformation information block is introduced in the image header information of the original dynamic image, so that the transformation region information can be stored in the transformation information block, so that the original dynamic image can be transformed according to the image transformation region determined by the transformation region information when the stretching transformation is performed, and the transformation region information can be changed as needed, that is, the image transformation region is variable, so that the transformation flexibility of the dynamic image is high. Moreover, under the same animation effect, the resource occupied by the APNG is smaller, the space size occupied by the dynamic image can be reduced, and the traffic required when the original dynamic image is acquired can be reduced.

[0219] The embodiment of the present application also provides a computer readable storage medium, which stores a computer application program, the computer application program includes program instructions, when the program instructions are executed, the image processing method provided by each step in the method can be implemented. Figure 4 The image processing method provided by each step in the method can be specifically referred to the implementation of the method. Figure 4 The implementation provided by each step in the method is not described here. In addition, the beneficial effects of using the same method are not described here. For technical details not disclosed in the computer readable storage medium embodiment of the present application, please refer to the description of the method embodiment of the present application. As an example, the program instructions can be deployed to be executed on one computer device, or on multiple computer devices located in one place, or on multiple computer devices distributed in multiple places and interconnected through a communication network.

[0220] The computer readable storage medium can be an internal storage unit of the image processing apparatus or the computer device, for example, a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the computer device. The computer readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.

[0221] The computer program product or the computer program includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the method provided in various optional manners in the method embodiments. Figure 4 The computer program product or the computer program includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the method provided in various optional manners in the method embodiments.

[0222] The terms "first", "second", and the like in the description and claims and drawings of the embodiments of the present application are used to distinguish different objects, and are not used to describe a specific order. In addition, the term "comprising" and any variation thereof is intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, device, product or equipment.

[0223] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0224] The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application, and each flow and / or block of the method flowchart and / or structural schematic diagram and the combination of the flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. The computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowchart Figure 1 of one or more flows and / or the functions specified in one or more blocks of the structural schematic diagram. Figure 1 The computer program instructions can also be stored in a computer readable memory capable of causing the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices, which implement the functions specified in the flowchart Figure 1 of one or more flows and / or the functions specified in one or more blocks of the structural schematic diagram. Figure 1 The computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flowchart Figure 1 of one or more flows and / or the functions specified in one or more blocks of the structural schematic diagram.

[0225] The above disclosure is only the preferred embodiments of the present application, and of course cannot limit the scope of the rights of the present application, so the equivalent changes made according to the claims of the present application still fall within the scope of the present application.

Claims

1. An image processing method, characterized in that, The method includes: In the communication session page, in response to the sending operation of business data, the session background associated with the user who sent the business data is obtained, the session background is determined as the original dynamic image, and a transformation request for the original dynamic image is generated. Based on the transformation request, image header information is obtained from the original dynamic image. A first bitmap image is generated according to the control frames and image data blocks in the image header information. Other bitmap images that make up the original dynamic image are generated sequentially according to the combination of n control frames and frame data blocks. The image format of the original dynamic image is a bitmap animation format based on portable network graphics. n is a positive integer. If the image header information does not contain a transformation information block, then the default transformation region is determined as the image transformation region of each bitmap image; If the transformation information block exists in the image header information, then the image transformation region corresponding to each bitmap image is determined according to the transformation region information included in the transformation information block; the transformation information block is a nine-dot data block; the transformation information block is generated based on the nine-dot data blocks of at least two bitmap images, and the original motion image is obtained by adding the transformation information block to the image header information of the base motion image; the at least two bitmap images include the first bitmap image and the other bitmap images; Obtain the image transformation size, and perform size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size to obtain the transformed image corresponding to each bitmap image; The target dynamic image is output based on the converted image corresponding to each bitmap image.

2. The method as described in claim 1, characterized in that, The transformation information block includes a first transformation information block and a second transformation information block; the i-th bitmap image corresponds to the first transformation information block; i is a positive integer, and i is less than the number of bitmap images included in the at least two bitmap images; If the image header information contains the transformation information block, then based on the transformation region information included in the transformation information block, the image transformation region corresponding to each bitmap image is determined, including: If the image header information does not contain the second transformation information block corresponding to the (i+1)th bitmap image, then the image transformation region of the (i+1)th bitmap image is determined according to the first transformation information block corresponding to the i-th bitmap image. If the image header information contains the second transformation information block corresponding to the (i+1)th bitmap image, then the image transformation region of the (i+1)th bitmap image is determined according to the second transformation information block.

3. The method as described in claim 1, characterized in that, The step of obtaining the image transformation size, and performing size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size, to obtain the transformed image corresponding to each bitmap image, includes: Obtain the transformed image dimensions; Obtain the region transformation method of the i-th bitmap image, and transform the image transformation region corresponding to the i-th bitmap image according to the image transformation size, so as to obtain the transformed image corresponding to the i-th bitmap image; i is a positive integer, i is less than or equal to the number of bitmap images included in the at least two bitmap images.

4. The method as described in claim 3, characterized in that, The region transformation method of the i-th bitmap image is a stretching transformation method; The step of transforming the image transformation region corresponding to the i-th bitmap image according to the image transformation size and the region transformation method to obtain the transformed image corresponding to the i-th bitmap image includes: Obtain the width and height spacing from the data padding information of the original dynamic image; Based on the width spacing, the height spacing, and the image transformation size, determine the predicted width and predicted height of the image transformation region corresponding to the i-th bitmap image; By using the stretching transformation method, the width of the image transformation region corresponding to the i-th bitmap image is stretched to the predicted width, and the height of the image transformation region corresponding to the i-th bitmap image is stretched to the predicted height, thereby obtaining the transformed image corresponding to the i-th bitmap image.

5. The method as described in claim 3, characterized in that, The region transformation method of the i-th bitmap image is a copy transformation method; The step of transforming the image transformation region corresponding to the i-th bitmap image according to the image transformation size and the region transformation method to obtain the transformed image corresponding to the i-th bitmap image includes: Based on the image transformation size, determine the predicted width and predicted height of the image transformation region corresponding to the i-th bitmap image; Obtain the region width and region height of the image transformation region corresponding to the i-th bitmap image, determine the first copy number of the image transformation region based on the predicted width and the region width, and determine the second copy number of the image transformation region based on the predicted height and the region height; Based on the first copy number and the second copy number, a predicted copy number is determined. Using the copy transformation method, the image transformation region corresponding to the i-th bitmap image is copied to obtain k image transformation regions; k is the predicted copy number. Based on the first copy number and the second copy number, the k image transformation regions are arranged and stitched together in the i-th bitmap image to obtain the transformed image corresponding to the i-th bitmap image.

6. The method as described in claim 1, characterized in that, The process of obtaining the image transformation size includes: Retrieve the communication session page and obtain business data; The spatial width and number of display rows of the service data in the communication session page are determined. Based on the spatial width and the number of display rows, the display size of the information box in the communication session page is determined, and the display size of the information box is determined as the image transformation size. The information box is used to display the service data.

7. The method as described in claim 6, characterized in that, The step of outputting the target dynamic image based on the converted image corresponding to each bitmap image includes: The transformed images corresponding to each bitmap image are combined to obtain the target dynamic image; Obtain the information box in the communication session page, determine the target dynamic image as the background image in the information box, and display the business data in the information box containing the target dynamic image.

8. The method as described in claim 1, characterized in that, The process of obtaining the image transformation size includes: In response to a scaling operation on the original dynamic image, the scaling width and scaling height corresponding to the scaling operation are obtained, and the image transformation size is determined based on the scaling width and the scaling height.

9. The method as described in claim 1, characterized in that, The step of obtaining the image transformation size, and performing size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size, to obtain the transformed image corresponding to each bitmap image, includes: In response to a region transformation command for the original dynamic image, obtain the region coverage position and image transformation size in the region transformation command; The image transformation region corresponding to each bitmap image is transformed according to the image transformation size to obtain the overlay sub-image corresponding to each bitmap image; The overlay sub-image is added to the region overlay position in the corresponding bitmap image to obtain the transformed image corresponding to each bitmap image.

10. An image processing apparatus, characterized in that, The device includes: The information acquisition module is used to respond to the sending operation of business data in the communication session page, acquire the session background associated with the user who sent the business data, determine the session background as the original dynamic image, and generate a transformation request for the original dynamic image. The information acquisition module is further configured to acquire image header information from the original dynamic image based on the transformation request, generate a first bitmap image according to the control frames and image data blocks in the image header information, and sequentially generate other bitmap images that make up the original dynamic image according to the combination of n control frames and frame data blocks; the image format of the original dynamic image is a bitmap animation format based on portable network graphics; n is a positive integer; The region determination module is used to determine the default transformation region as the image transformation region of each bitmap image if there is no transformation information block in the image header information; The region determination module is further configured to, if the image header information contains the transformation information block, determine the image transformation region corresponding to each bitmap image based on the transformation region information included in the transformation information block; the transformation information block is a nine-dot data block; the transformation information block is generated based on the nine-dot data blocks of at least two bitmap images, and the original dynamic image is obtained by adding the transformation information block to the image header information of the basic dynamic image; the at least two bitmap images include the first bitmap image and the other bitmap images; The image transformation module is used to obtain the image transformation size, and to perform size transformation on the image transformation region corresponding to each bitmap image according to the image transformation size, so as to obtain the transformed image corresponding to each bitmap image. The image generation module is used to output the target dynamic image based on the converted image corresponding to each bitmap image.

11. The apparatus as claimed in claim 10, characterized in that, The transformation information block includes a first transformation information block and a second transformation information block; the i-th bitmap image corresponds to the first transformation information block; i is a positive integer, and i is less than the number of bitmap images included in the at least two bitmap images; The region determination module includes: The region acquisition unit is used to determine the image transformation region of the (i+1)th bitmap image based on the first transformation information block corresponding to the i-th bitmap image if the second transformation information block corresponding to the (i+1)th bitmap image does not exist in the image header information. The region acquisition unit is further configured to determine the image transformation region of the (i+1)th bitmap image based on the second transformation information block if the image header information contains the second transformation information block corresponding to the (i+1)th bitmap image.

12. The apparatus as claimed in claim 10, characterized in that, The image transformation module includes: Size acquisition unit, used to acquire the image transformation size; The region transformation unit is used to obtain the region transformation method of the i-th bitmap image, and transform the image transformation region corresponding to the i-th bitmap image according to the image transformation size and the region transformation method to obtain the transformed image corresponding to the i-th bitmap image; i is a positive integer, i is less than or equal to the number of bitmap images included in the at least two bitmap images.

13. A computer device, characterized in that, Including processor and memory; The memory is used to store computer applications, and the processor executes the computer applications stored in the memory to implement the image processing method as described in any one of claims 1-9.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer application program, which includes program instructions that, when executed, implement the image processing method as described in any one of claims 1-9.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method described in any one of claims 1-9.

Citation Information

Patent Citations

  • Dynamic wallpaper implementation method and device

    CN110908762A