CN106920270B - Animation processing method and device - Google Patents

Animation processing method and device Download PDF

Info

Publication number
CN106920270B
CN106920270B CN201510990530.XA CN201510990530A CN106920270B CN 106920270 B CN106920270 B CN 106920270B CN 201510990530 A CN201510990530 A CN 201510990530A CN 106920270 B CN106920270 B CN 106920270B
Authority
CN
China
Prior art keywords
animation
information
image
bitmap
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510990530.XA
Other languages
Chinese (zh)
Other versions
CN106920270A (en
Inventor
曾祥清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Boya Network Games Development Shenzhen Co ltd
Original Assignee
Boya Network Games Development Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Boya Network Games Development Shenzhen Co ltd filed Critical Boya Network Games Development Shenzhen Co ltd
Priority to CN201510990530.XA priority Critical patent/CN106920270B/en
Publication of CN106920270A publication Critical patent/CN106920270A/en
Application granted granted Critical
Publication of CN106920270B publication Critical patent/CN106920270B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Abstract

The invention relates to an animation processing method, which comprises the following steps: loading an animation file; analyzing the animation file to obtain animation information and image data for generating an image; when the image data is used for generating a vector diagram, establishing a vector diagram object according to the image data, and establishing a bitmap object corresponding to the vector diagram object; copying pixels in the vector image object into the bitmap object; saving the bitmap object as a bitmap; and displaying the animation in the animation scene according to the animation information and the saved bitmap. The animation effect in the animation file is realized in the animation scene, the speed of converting the vector diagram into the bitmap is improved, the animation effect of the animation file can be realized in the scene according to the bitmap, and therefore the animation production efficiency in the animation scene is improved.

Description

Animation processing method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an animation processing method and apparatus.
Background
With the development of image processing technology, the animation industry is more and more mature. In the conventional animation industry, after an animation file is created by an art designer, a vector diagram in the animation file needs to be converted into a bitmap, and the bitmap is used for animation creation of a scene. The traditional bitmap conversion needs manual vector image identification, manual vector image conversion is manually stored as a bitmap, and the speed of manual conversion is low, so that animation production in a scene is low in efficiency.
Disclosure of Invention
In view of the above, it is desirable to provide a method and apparatus for processing animation, which addresses the problem of inefficient animation production in a scene.
An animation processing method, comprising:
loading an animation file;
analyzing the animation file to obtain animation information and image data for generating an image;
when the image data is used for generating a vector diagram, establishing a vector diagram object according to the image data, and establishing a bitmap object corresponding to the vector diagram object;
copying pixels in the vector image object into the bitmap object;
saving the bitmap object as a bitmap;
and displaying the animation in the animation scene according to the animation information and the saved bitmap.
In one embodiment, the parsing the animation file, and obtaining animation information and image data for generating an image includes:
traversing and analyzing each frame of the animation file; each frame comprises a graphic label, a display label, a removal label and a single-frame ending label;
when the graphic label is analyzed, extracting image data in the graphic label;
when the display label is analyzed, extracting image display information in the display label and recording the image display information in animation information;
when the removal label is analyzed, extracting image removal information in the removal label and recording the image removal information in animation information;
and when the single-frame end label is analyzed, analyzing the next frame until the animation file is analyzed completely.
In one embodiment, before creating a vector graphics object from the image data and creating a bitmap object corresponding to the vector graphics object when the image data is used to generate a vector graphics, the method further comprises:
and judging whether the bitmap identification exists in the image data, if so, judging that the image data is used for generating a bitmap, and if not, judging that the image data is used for generating a vector diagram.
In one embodiment, said creating a vector graphics object from said image data comprises:
extracting vertex information and filling information of a vector diagram in image data;
drawing a frame of the vector graphics object according to the vertex information;
filling the contents of the vector graphics object in the frame of the vector graphics object according to the filling information to generate the vector graphics object.
In one embodiment, said presenting an animation in an animation scene according to said animation information and a saved bitmap comprises:
generating an animation configuration file according to the animation information;
and extracting the saved bitmap, and displaying the animation in the animation scene according to the animation configuration file.
The animation processing method comprises the steps of analyzing an animation file, obtaining animation information in the animation file and image data used for generating an image, drawing a vector diagram object according to the image data when the image data is used for generating a vector diagram, establishing a bitmap object by copying pixels in the vector diagram object, converting the bitmap object into a bitmap and storing the bitmap, and displaying the animation in an animation scene according to the animation information and the stored bitmap. Therefore, the animation effect in the animation file is realized in the animation scene, the speed of converting the vector diagram into the bitmap is improved, the animation effect of the animation file can be realized in the scene according to the bitmap, and the animation production efficiency in the animation scene is improved.
An animation processing apparatus comprising:
the loading module is used for loading the animation file;
the analysis module is used for analyzing the animation file to obtain animation information and image data used for generating an image;
the identification module is used for establishing a vector diagram object according to the image data and establishing a bitmap object corresponding to the vector diagram object when the image data is used for generating a vector diagram; copying pixels in the vector image object into the bitmap object;
the storage module is used for storing the bitmap object as a bitmap;
and the animation generation and output module is used for displaying the animation in the animation scene according to the animation information and the saved bitmap.
In one embodiment, the parsing module is further configured to parse through each frame of the animation file; each frame comprises a graphic label, a display label, a removal label and a single-frame ending label; when the graphic label is analyzed, extracting image data in the graphic label; when the display label is analyzed, extracting image display information in the display label and recording the image display information in animation information; when the removal label is analyzed, extracting image removal information in the removal label and recording the image removal information in animation information; and when the single-frame end label is analyzed, analyzing the next frame until the animation file is analyzed completely.
In one embodiment, the identification module is further configured to determine whether a bitmap identifier exists in the image data, determine that the image data is used to generate a bitmap if the bitmap identifier exists in the image data, and determine that the image data is used to generate a vector map if the bitmap identifier does not exist in the image data.
In one embodiment, the identification module is further configured to extract vertex information and fill information of a vector image in the image data; drawing a frame of the vector graphics object according to the vertex information; filling the contents of the vector graphics object in the frame of the vector graphics object according to the filling information to generate the vector graphics object.
In one embodiment, the method further comprises the following steps:
the configuration file generating module is used for generating an animation configuration file according to the animation information;
the animation generation and output module is also used for extracting the saved bitmap and displaying the animation in the animation scene according to the animation configuration file.
The animation processing device analyzes the animation file, acquires animation information in the animation file and image data used for generating an image, draws a vector diagram object according to the image data when the image data is used for generating a vector diagram, establishes a bitmap object by copying pixels in the vector diagram object, converts the bitmap object into a bitmap and stores the bitmap, and displays the animation in an animation scene according to the animation information and the stored bitmap. Therefore, the animation effect in the animation file is realized in the animation scene, the speed of converting the vector diagram into the bitmap is improved, the animation effect of the animation file can be realized in the scene according to the bitmap, and the animation production efficiency in the scene is improved.
Drawings
FIG. 1 is a flow diagram illustrating a method for processing animation according to one embodiment;
FIG. 2 is a schematic flow chart diagram illustrating the steps of creating vector graphics objects in one embodiment;
FIG. 3 is a flow diagram that illustrates the animation steps in an animation scene, in one embodiment;
FIG. 4 is a flowchart illustrating a method of processing an animation according to an embodiment;
FIG. 5 is a block diagram showing the construction of an animation processing apparatus according to an embodiment;
FIG. 6 is a block diagram showing the construction of an animation processing apparatus according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, in one embodiment, an animation processing method is provided, which may be applied to a desktop computer or a server on which an animation processing program runs, and the animation processing method is implemented by the animation processing program. The method specifically comprises the following steps:
step 102, loading the animation file.
Specifically, an animation file refers to a file that is created using animation software to achieve a certain animation effect. The Format of the animation file may specifically be a swf (Shock Wave Format) file. And when the desktop computer detects an instruction for loading the animation file, loading the selected animation file.
And 104, analyzing the animation file to obtain animation information and image data for generating an image.
Specifically, after the desktop computer loads the animation file, parsing of the animation file is started, and animation information in the animation file and image data for generating an image are extracted by the parsing. The animation file includes a bitmap and a vector map. Bitmaps, also known as dot matrix images or rendered images, are composed of individual dots called pixels (picture elements). Vector graphics, also known as object-oriented images or drawing images, are mathematically defined as a series of points connected by lines. Image data used for generating an image can be specifically classified into two types, that is, image data used for generating a bitmap and image data used for generating a vector diagram, according to the type of the generated image. The animation information is information indicating the position of an image in an animation file.
In one embodiment, step 104 includes: traversing and analyzing each frame of the animation file; each frame comprises a graphic label, a display label, a removal label and a single-frame end label; when the graphic label is analyzed, extracting image data in the graphic label; when the display label is analyzed, extracting image display information in the display label and recording the image display information in the animation information; when the removal label is analyzed, extracting image removal information in the removal label and recording the image removal information in animation information; and when the single-frame end label is analyzed, analyzing the next frame until the animation file is analyzed completely.
Specifically, when parsing the animation file, the desktop computer obtains animation file information, where the animation file information may specifically include frame frequency, total frame number, width, and high level information, and is recorded in the animation information. And the desktop computer analyzes each frame in the animation file according to the total frame number and a certain sequence, wherein each frame comprises a graphic label, a display label, a removal label, a single-frame end label and other labels. Image data for generating an image is included in the graphic label.
The display label includes a display mark and display information of an image generated from image data in the graphic label, and when the display mark is analyzed, the display information is recorded. The display mark may be a number, a character, a keyword, or the like. The display information may specifically include an image identifier, a display level of an image in the animation, an image position parameter, an image rotation parameter, an image tilt parameter, a color parameter, a level affected by the image masking, and the like. Wherein the image position parameters, the image rotation parameters and the image tilt parameters are recorded in a matrix, which may be a 3 × 3 matrix. The removal label comprises a removal mark and information of a removal level required when the image information is displayed, and when the removal mark is resolved, the information of the removal level is recorded. The removal mark may be a number, a character, a keyword, or the like. The single frame end tag comprises a single frame end mark, when the single frame end mark is analyzed, the display information and the removal information recorded in the previous analysis are stored in the array according to the recording analysis sequence, and then the next frame is analyzed. The single frame end tag may be a number, a character, a keyword, or the like.
And 106, when the image data is used for generating the vector graphics, establishing a vector graphics object according to the image data, and establishing a bitmap object corresponding to the vector graphics object.
Specifically, whether the image data is for generating a vector image is determined by determining whether vector image feature information or bitmap feature information exists in the image data. If the vector image characteristic information does not exist in the image data or the bitmap characteristic information exists in the image data, judging that the image data is used for generating a bitmap, and directly storing the bitmap; and if the vector image feature information or the bitmap feature information does not exist in the image data, judging that the image data is used for generating the vector image, establishing a vector image object according to the image data, and establishing a bitmap object corresponding to the vector image object. The vector diagram object and the bitmap object are intermediate variables for converting the vector diagram into the bitmap. The characteristic information may specifically be a number or a character. For example, the vector diagram is represented by 1, and the bitmap is represented by 0.
In one embodiment, after extracting the image data in the image tag, the desktop computer determines whether a bitmap identification exists in the image data, the bitmap identification being a unique identification for distinguishing the bitmap. And the vector diagram is not identified. If the bitmap identification exists in the image data after judgment, judging that the image data is used for generating a bitmap; if no bitmap identification exists in the image data, the image data is judged to be used for generating the vector diagram, and the vector diagram needs to be converted into the bitmap.
At step 108, pixels in the vector image object are copied into the bitmap object.
Specifically, after a vector graphics object is created using image data, a desktop computer copies pixels in the vector graphics object and pastes the copied pixels into a bitmap object corresponding to the vector graphics object to generate a bitmap from the bitmap object.
Step 110, saving the bitmap object as a bitmap.
Specifically, the desktop computer converts the bitmap object copied with the vector image object pixels into a corresponding bitmap, allocates a bitmap identification for the bitmap, and converts the bitmap with the bitmap identification into a file with a corresponding format and stores the file in a specific directory. When converting a bitmap into a file of a corresponding format, the file may be named according to the bitmap identification. The file format can be png, jpeg or bmp format.
And 112, displaying the animation in the animation scene according to the animation information and the saved bitmap.
Specifically, the desktop computer extracts all saved bitmaps or bitmap files, restores the animation files in the animation scene according to the animation information, so as to achieve animation effects in the animation files in the animation scene, and displays the animation in the animation scene. An animated scene is an instance or scenario of animated character activity and performance. The animation scene may specifically be any one of a game animation scene, an animation scene in an animation movie, and an animation scene in an animation series.
In this embodiment, an animation file is parsed, animation information in the animation file and image data used for generating an image are acquired, a vector image object is drawn according to the image data by judging that the image data is used for generating a vector image, a bitmap object is created by copying pixels in the vector image object, the bitmap object is converted into a bitmap and stored, and an animation is displayed in an animation scene according to the animation information and the stored bitmap. Therefore, the animation effect in the animation file is realized in the animation scene, the speed of converting the vector diagram into the bitmap is improved, the animation effect of the animation file can be realized in the scene according to the bitmap, and the animation production efficiency in the scene is improved.
As shown in fig. 2, in an embodiment, the step 104 specifically includes the following steps:
step 202, extracting vertex information and filling information of the vector diagram in the image data.
Specifically, when it is determined that the image data is for generating a vector image, the desktop computer extracts vertex information and fill information of the vector image from the image data. The vector diagram is formed by a frame formed by connecting a series of points, which are the vertices of the vector diagram, and the content filled in the frame. The padding information is information of the content padded in the frame.
And step 204, drawing a frame of the vector diagram object according to the vertex information.
Specifically, the vertex information may be position information of vertices, and the desktop computer draws the vertices based on the vertex information, connects the drawn vertices with lines, and forms a frame of the vector diagram object after connecting the vertices with the lines.
And step 206, filling the content of the vector graphics object in the frame of the vector graphics object according to the filling information to generate the vector graphics object.
Specifically, the fill information includes color information of the content in the frame of the vector graphics object. The desktop computer renders the contents of the vector graphics object in the frame of the vector graphics object using the fill information, and after rendering the contents of the vector graphics, the completed vector object is formed.
In the embodiment, the content of the vector diagram is drawn by establishing the vector diagram object, so that the content of the vector diagram is prevented from being changed in the image conversion process, and the accuracy of image conversion is improved by establishing the vector diagram object.
As shown in FIG. 3, in one embodiment, step 112 includes the steps of:
step 302, generating an animation configuration file according to the animation information.
Specifically, the desktop computer extracts animation information recorded when the animation file is parsed, including information of the animation file, display information and removal information of an image corresponding to each frame, and the like, and generates an animation profile based on the recorded animation information. The animation is composed of a plurality of continuous pictures which are formed by splicing corresponding images of each frame. The animation configuration file specifically includes a jigsaw information configuration file and an animation information configuration file. The tile configuration file is information on the position of the recorded image in the picture. The animation information profile is a sequence in which a plurality of consecutive pictures are recorded. Firstly, generating a jigsaw information configuration file according to the cartoon information, and then forming the cartoon information configuration file according to the jigsaw information configuration file.
And step 304, extracting the saved bitmap, and displaying the animation in the animation scene according to the animation configuration file.
Specifically, the desktop computer extracts all saved bitmaps, firstly splices the bitmaps according to the jigsaw information configuration file to generate a plurality of pictures, displays the pictures according to the sequence of the pictures in the animation information configuration file to form an animation, and displays the formed animation in an animation scene.
In this embodiment, the animation configuration file is generated according to the acquired animation information in the animation file, and the animation effect in the animation file can be restored in the animation scene according to the animation configuration file, so that the accuracy rate of restoring the animation effect in the animation file in the animation scene is improved.
As shown in fig. 4, in an embodiment, an animation processing method is provided, which specifically includes the following steps:
and step 402, loading the animation file, acquiring animation file information and recording the animation file information into the animation information.
And analyzing the animation file to obtain animation file information and recording the animation file information into the animation information.
Specifically, when the animation file is parsed, parsing data of the animation file, reading information of a frame frequency, a total number of frames, a width, a height and the like in the animation file, performing frame-by-frame parsing on the animation file to parse a label of each frame of animation, and when a graphic label is parsed in a frame of the animation file, executing step 404; when the display label and the removal label are resolved, executing step 412; when the single frame end tag is resolved, step 414 is performed.
Step 404, parsing the graphic label in the animation file frame and extracting the image data in the graphic label.
Step 406, judging whether the image data is used for generating a vector diagram; if yes, go to step 408; if not, the image data is determined to be used to generate a bitmap and step 410 is executed.
Step 408, creating a vector graphics object from the image data, creating a bitmap object corresponding to the vector graphics object, and copying pixels in the vector graphics object into the bitmap object to generate a bitmap.
Step 410, save the bitmap.
Specifically, when the image data in the graphic label is judged to be used for generating the bitmap, the bitmap is directly stored without being converted; when the image data in the image label is judged to be used for generating the vector diagram, the vector diagram is converted into the bitmap, the converted bitmap is stored, and after all the vector diagrams in the animation file are converted into the bitmap, the animation is restored according to the stored bitmap.
And step 412, analyzing the display label and the removal label in the animation file frame, extracting the image display information in the display label and the image removal information in the removal label, and recording the information into the animation information.
Specifically, when the display mark is resolved at the time of resolving the tag, the resolved tag is a display tag; when the removal tag is resolved, the tag is removed when the resolved tag. The display label or the removal mark may specifically be at least one of a number, a character, and a keyword.
Step 414, parsing the single frame end tag in the animation file frame.
Specifically, when the tag is parsed, the parsed tag is a single frame end tag when the end tag is parsed. The end mark may specifically be at least one of a number, a character, and a keyword.
Step 416, determine whether the animation file is completely parsed. If yes, go to step 418; if not, at least one of the steps 404, 412 and 414 is performed.
When it is determined that the animation file has not been completely parsed, at least one of the steps 404, 412 and 414 is performed.
Step 418, generating an animation configuration file according to the animation information.
And step 420, extracting the saved bitmap, and displaying the animation in the animation scene according to the animation configuration file.
In the embodiment, the animation file is loaded, the animation file is stored in animation information, the animation file is analyzed frame by frame, specifically, labels in the frames are analyzed, whether image data in graphic labels are used for generating vector diagrams or not is judged, the vector diagrams are converted into bitmaps, all the vector diagrams in the animation file are converted into the bitmaps, and the conversion accuracy of the vector diagrams is improved; the image display information and the image removal information in the display label and the removal label are obtained through analysis and are recorded in the animation information, and the position of the bitmap in the animation can be determined through the animation information, so that the quality of the restored animation is improved; when the single-frame end label is analyzed, whether the next frame needs to be analyzed is determined by judging whether the animation file is analyzed completely so as to ensure the complete analysis of the animation file; after the animation file is judged and determined to be analyzed, the animation configuration file is generated according to the animation information, all the bitmaps are configured in the animation scene according to the animation configuration file, the accuracy of restoring the animation effect in the animation file in the animation scene is improved, and the animation production efficiency is improved.
As shown in FIG. 5, in one embodiment, an animation processing apparatus 500 is provided, the apparatus comprising: a loading module 502, a parsing module 504, a recognition module 506, a saving module 508, and an animation generation and output module 510.
And a loading module 502 for loading the animation file.
And the parsing module 504 is configured to parse the animation file, to obtain animation information and image data used for generating an image.
A recognition module 506, configured to determine whether the image data is used for generating a vector diagram; if yes, establishing a vector diagram object according to the image data, and establishing a bitmap object corresponding to the vector diagram object; copying pixels in the vector image object into the bitmap object.
A saving module 508, configured to save the bitmap object as a bitmap.
And an animation generation and output module 510 for displaying the animation in the animation scene according to the animation information and the saved bitmap.
In this embodiment, an animation file is parsed, animation information in the animation file and image data used for generating an image are acquired, a vector image object is drawn according to the image data by judging that the image data is used for generating a vector image, a bitmap object is created by copying pixels in the vector image object, the bitmap object is converted into a bitmap and stored, and an animation is displayed in an animation scene according to the animation information and the stored bitmap. Therefore, the animation effect in the animation file is realized in the animation scene, the speed of converting the vector diagram into the bitmap is improved, the animation effect of the animation file can be realized in the scene according to the bitmap, and the animation production efficiency in the scene is improved.
In one embodiment, parsing module 504 is also used to traverse each frame of the parsed animation file; each frame comprises a graphic label, a display label, a removal label and a single-frame end label; when the graphic label is analyzed, extracting image data in the graphic label, and executing the step of judging whether the graphic data is used for generating a vector diagram; when the display label and the removal label are analyzed, extracting image display information and image removal information and recording the image display information and the image removal information in animation information; and when the single-frame end label is analyzed, analyzing the next frame.
In the embodiment, the animation information of the image corresponding to each frame is acquired by analyzing each frame, and when the animation effect of the animation file is restored, the restoration can be performed according to each frame, so that the accuracy rate of restoring the animation effect in the animation file is improved.
In one embodiment, the identification module 506 is further configured to determine whether a bitmap identifier exists in the image data, and if so, determine that the image data is used for generating a bitmap, and if not, determine that the image data is used for generating a vector map.
In the embodiment, whether the image data is generated by the vector diagram is judged by judging whether the bitmap identification exists in the image data or not, and the vector diagram is converted into the bitmap, so that the images generated by all the image data are prevented from being converted, the conversion speed is improved, and the consumed operation resources during conversion are prevented from being wasted.
In one embodiment, the identification module 506 is further configured to extract vertex information and fill information of the vector graphics in the image data; drawing a frame of the vector diagram object according to the vertex information; filling the contents of the vector image object in the frame of the vector image object according to the filling information to generate the vector image object.
In the embodiment, the vector objects corresponding to the vector graphics are accurately drawn through the vertex information and the filling information, and the bitmap is converted according to the vector objects, so that the accuracy of converting the vector graphics into the bitmap is improved, and the situation that the image content is changed due to the conversion with the image is avoided.
As shown in FIG. 6, in one embodiment, the animation processing device 500 further comprises: a configuration file generation module 512.
And a configuration file generating module 512, configured to generate an animation configuration file according to the animation information.
The animation generation and output module 510 is further configured to extract the saved bitmap, and display the animation in the animation scene according to the animation configuration file.
In this embodiment, the animation configuration file is generated according to the acquired animation information in the animation file, and the animation effect in the animation file can be restored in the animation scene according to the animation configuration file, so that the accuracy rate of restoring the animation effect in the animation file in the animation scene is improved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. An animation processing method, comprising:
loading an animation file;
analyzing the animation file to obtain animation information and image data for generating an image; the animation information represents the position information of the image in the animation file in the animation; the animation information records image display information, image removal information and animation file information, wherein the animation file information comprises frame frequency, total frame number, width and height;
when the image data is used for generating a vector diagram, extracting vertex information and filling information of the vector diagram in the image data; drawing a frame of the vector graphics object according to the vertex information; filling the contents of the vector graphics object in the frame of the vector graphics object according to the filling information to generate the vector graphics object, and establishing a bitmap object corresponding to the vector graphics object; the vector image object and the bitmap object are intermediate variables for converting a vector image into a bitmap;
copying pixels in the vector image object into the bitmap object;
saving the bitmap object as a bitmap;
and displaying the animation in the animation scene according to the animation information and the saved bitmap.
2. The animation processing method as claimed in claim 1, wherein the parsing the animation file, and obtaining animation information and image data for generating an image comprises:
traversing and analyzing each frame of the animation file; each frame comprises a graphic label, a display label, a removal label and a single-frame ending label;
when the graphic label is analyzed, extracting image data in the graphic label;
when the display label is analyzed, extracting image display information in the display label and recording the image display information in animation information;
when the removal label is analyzed, extracting image removal information in the removal label and recording the image removal information in animation information;
and when the single-frame end label is analyzed, analyzing the next frame until the animation file is analyzed completely.
3. The animation processing method as claimed in claim 1, wherein before extracting vertex information and fill information of a vector image in the image data when the image data is used to generate the vector image, the method further comprises:
and judging whether the bitmap identification exists in the image data, if so, judging that the image data is used for generating a bitmap, and if not, judging that the image data is used for generating a vector diagram.
4. The animation processing method according to claim 1, wherein the image display information includes: image identification, display level of the image in the animation, image position parameters, image rotation parameters, image inclination parameters, color parameters and affected level when the image is masked.
5. The animation processing method as claimed in claim 1, wherein said presenting an animation in an animation scene according to the animation information and the saved bitmap comprises:
generating an animation configuration file according to the animation information;
and extracting the saved bitmap, and displaying the animation in the animation scene according to the animation configuration file.
6. An animation processing apparatus, comprising:
the loading module is used for loading the animation file;
the analysis module is used for analyzing the animation file to obtain animation information and image data used for generating an image; the animation information represents the position information of the image in the animation file in the animation; the animation information records image display information, image removal information and animation file information, wherein the animation file information comprises frame frequency, total frame number, width and height;
the identification module is used for extracting vertex information and filling information of the vector graphics in the image data when the image data is used for generating the vector graphics; drawing a frame of the vector graphics object according to the vertex information; filling the contents of the vector graphics object in the frame of the vector graphics object according to the filling information to generate the vector graphics object, and establishing a bitmap object corresponding to the vector graphics object; copying pixels in the vector image object into the bitmap object; the vector image object and the bitmap object are intermediate variables for converting a vector image into a bitmap;
the storage module is used for storing the bitmap object as a bitmap;
and the animation generation and output module is used for displaying the animation in the animation scene according to the animation information and the saved bitmap.
7. The animation processing apparatus of claim 6, wherein the parsing module is further configured to parse through each frame of the animation file; each frame comprises a graphic label, a display label, a removal label and a single-frame ending label; when the graphic label is analyzed, extracting image data in the graphic label; when the display label is analyzed, extracting image display information in the display label and recording the image display information in animation information; when the removal label is analyzed, extracting image removal information in the removal label and recording the image removal information in animation information; and when the single-frame end label is analyzed, analyzing the next frame until the animation file is analyzed completely.
8. The apparatus of claim 6, wherein the identification module is further configured to determine whether a bitmap identifier exists in the image data, and if so, determine that the image data is used to generate a bitmap, and if not, determine that the image data is used to generate a vector image.
9. The animation processing apparatus according to claim 6, wherein the image display information includes: image identification, display level of the image in the animation, image position parameters, image rotation parameters, image inclination parameters, color parameters and affected level when the image is masked.
10. The animation processing apparatus according to claim 6, further comprising:
the configuration file generating module is used for generating an animation configuration file according to the animation information;
the animation generation and output module is also used for extracting the saved bitmap and displaying the animation in the animation scene according to the animation configuration file.
11. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the method of any one of claims 1 to 5.
CN201510990530.XA 2015-12-24 2015-12-24 Animation processing method and device Active CN106920270B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510990530.XA CN106920270B (en) 2015-12-24 2015-12-24 Animation processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510990530.XA CN106920270B (en) 2015-12-24 2015-12-24 Animation processing method and device

Publications (2)

Publication Number Publication Date
CN106920270A CN106920270A (en) 2017-07-04
CN106920270B true CN106920270B (en) 2021-06-25

Family

ID=59458720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510990530.XA Active CN106920270B (en) 2015-12-24 2015-12-24 Animation processing method and device

Country Status (1)

Country Link
CN (1) CN106920270B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389661B (en) * 2017-08-04 2024-03-01 阿里健康信息技术有限公司 Animation file conversion method and device
CN109189524A (en) * 2018-08-09 2019-01-11 北京金山安全软件有限公司 Image resource generation method and device
CN111324405A (en) * 2020-01-20 2020-06-23 北京无限光场科技有限公司 Character display method and device and electronic equipment
CN113920234B (en) * 2021-12-13 2022-03-25 杭州安恒信息技术股份有限公司 Method and related device for converting SVG animation into GIF

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651140A (en) * 2011-02-23 2012-08-29 腾讯科技(深圳)有限公司 Method and device for image rendering
CN103729190A (en) * 2013-12-31 2014-04-16 天津华永无线科技有限公司 Method for displaying unified parsing of multiple media on mobile terminal

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8411115B1 (en) * 2006-10-23 2013-04-02 Adobe Systems Incorporated Scaling raster objects in a graphical development enviroment using nine-slice scaling
ATE543164T1 (en) * 2007-06-28 2012-02-15 Ericsson Telefon Ab L M DATA SYSTEM AND PROCEDURES
US20090044117A1 (en) * 2007-08-06 2009-02-12 Apple Inc. Recording and exporting slide show presentations using a presentation application
CN101470893B (en) * 2007-12-26 2011-01-19 中国科学院声学研究所 Vector graphic display acceleration method based on bitmap caching
US9280839B2 (en) * 2008-01-29 2016-03-08 International Business Machines Corporation Generation of a vector graphic from a hand-drawn diagram
CN101593354B (en) * 2009-07-01 2013-04-10 上海可鲁系统软件有限公司 Method and device for redrawing two-dimension vector graphics
CN102368247B (en) * 2011-09-16 2015-03-18 杭州典能科技有限公司 Method for executing SWF (Small Web Format) file on handheld terminal
CN102592261B (en) * 2011-12-30 2014-01-15 上海居冠软件有限公司 Vector diagram showing method and system
CN104933747B (en) * 2015-06-10 2018-01-12 北京奇虎科技有限公司 Vector animation is converted to the method and device of bitmaps animation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651140A (en) * 2011-02-23 2012-08-29 腾讯科技(深圳)有限公司 Method and device for image rendering
CN103729190A (en) * 2013-12-31 2014-04-16 天津华永无线科技有限公司 Method for displaying unified parsing of multiple media on mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android微信上的SVG;Carl WeMobileDev;《Https://mp.weixin.qq.com/s?__biz=MzAwNDY1ODY2OQ==&mid=207863967&idx=1&sn=3d7b07d528f38e9f812e8df7df1e3322&utm_source=androidweekly.io&utm_medium=website》;20150907;第1-9页 *

Also Published As

Publication number Publication date
CN106920270A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
CN110458918B (en) Method and device for outputting information
CN106920270B (en) Animation processing method and device
US20210240913A1 (en) Font rendering method and apparatus, and computer-readable storage medium
CN111221596B (en) Font rendering method, apparatus and computer readable storage medium
CN106327453B (en) Method for splicing picture resources and picture resource splicing device
CN115439609B (en) Three-dimensional model rendering method, system, equipment and medium based on map service
CN112052050B (en) Shared picture generation method, system, storage medium and terminal equipment
US20180349444A1 (en) Glyph management in texture atlases
CN111338733A (en) User interface adaptation method and system
CN111061896A (en) Loading method, device, equipment and medium for 3D (three-dimensional) graph based on glTF (generalized likelihood TF)
US20110175927A1 (en) Information processing apparatus, method of operation thereof and storage medium
CN110866965A (en) Mapping drawing method and device for three-dimensional model
JP2017211936A (en) Document storage processing system
CN114862644A (en) Watermark deleting method, electronic device and computer readable storage medium
JP6414475B2 (en) Computer program and control device
CN106155728B (en) Method and device for detecting fonts of browser supporting canvas
CN114339208A (en) Video testing method and device, electronic equipment and computer storage medium
CN104392410B (en) Picture integration method, skin method for drafting and equipment in integumentary system
JP2008206073A (en) Image processing apparatus, control method, program, and storage medium
CN110119380B (en) Storage and reading method and device for scalable vector graphics file
CN114610920B (en) Image storage format generation method, image storage format and processing system
TWI633498B (en) Image processing device, image processing method, and program product
CN111399788A (en) Media file playing method and media file playing device
CN116167910B (en) Text editing method, text editing device, computer equipment and computer readable storage medium
CN112182458B (en) Page data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant