CN106651995A - Animation resource configuration method, playback method and device - Google Patents
Animation resource configuration method, playback method and device Download PDFInfo
- Publication number
- CN106651995A CN106651995A CN201610884817.9A CN201610884817A CN106651995A CN 106651995 A CN106651995 A CN 106651995A CN 201610884817 A CN201610884817 A CN 201610884817A CN 106651995 A CN106651995 A CN 106651995A
- Authority
- CN
- China
- Prior art keywords
- picture
- data
- image data
- animation
- control data
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
Abstract
The invention discloses an animation resource configuration method, a playback method and a device, so as to simplify management on animation resources and enable picture quality modification and rendering optimization to be simple and easy to operate. The animation resource configuration method provided by the embodiment of the invention comprises steps: according to frame configuration information inputted in advance, at least two picture source files configured to different frame times are acquired; the at least two picture source files are merged to picture data, wherein the at least two picture source files are located at different region positions in the picture data respectively; according to the frame configuration information and the region positions of the at least two picture source files in the picture data, control data are generated; and the control data and the picture data are stored to two different file data packets respectively, and the two different file data packets are packaged together to obtain animation resources.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of collocation method of animation resource, player method and dress
Put.
Background technology
Animation resource be describe animation partial data information, such as one graphic interchange format (Graphics
Interchange Format, GIF) file, it contains the image data and control data of animation.In terminal plays animation money
During source, picture drawing engine is called to read the image data preserved in the animation resource, then according to certain frame per second is carried out
Play, now image data and control data have all been configured in advance in animation resource, and are decided, therefore animation is provided
The image quality and broadcasting parameter that source can show when playing all is to configure good in advance.But the picture in current animation resource
Together with data are typically mixed with control data, during the file volume data of animation resource is stored in jointly, by file header
Different field in data reads respectively image data and control data with mark, but this image data is miscellaneous with control data
, there is management and get up dumb in the animation resource mixed together, render optimization inconvenience, the shortcoming that image quality modification is limited to, example
Such as picture drawing engine change, when requiring to update animation image quality, can all cause the problem that existing animation resource cannot be compatible, by
Together with control data in animation resource is mixed with image data, this is accomplished by remaking animation resource.
Illustrate, drawing engine DirectX or OpenGL directly can not create textural characteristics from animation resource, but
Need first to draw picture, this be accomplished by first mixing with control data from animation resource together with image data in extract it is many
The picture of individual frame, for the image data of each frame regenerates textural characteristics, then carries the textural characteristics for covering image data
Video card is sent to, is accomplished by repeatedly being merged into textural characteristics during the image data for extracting each frame, and this is clearly resulted in animation
The use underaction of resource, complex operation.
The content of the invention
A kind of collocation method, the playing method and device of animation resource are embodiments provided, for simplifying to dynamic
Draw resource management, image quality change and render optimization it is simple to operation.
To solve above-mentioned technical problem, the embodiment of the present invention provides technical scheme below:
In a first aspect, the embodiment of the present invention provides a kind of collocation method of animation resource, including:
At least two picture source files for being allocated to different frame times are obtained according to the frame configuration information for pre-entering;
At least two pictures source file is merged into image data, at least two pictures source file is described
Different regional locations are respectively in image data;
According to the regional location of the frame configuration information and at least two pictures source file in the image data
Generate control data;
The control data and the image data are respectively stored into two different file data bags, and will be described
Two different file data bags are packaged with so as to obtain animation resource.
Second aspect, the embodiment of the present invention also provides a kind of player method of animation resource, including:
Obtain the animation resource for needing to play;
Two different file data bags are parsed from the animation resource, and according to described two different number of files
Control data and image data are got respectively according to bag;
At least two picture sources are got respectively from the zones of different position of the image data according to the control data
File;
At least two pictures source file is played successively in different frame times according to the control data.
The third aspect, the embodiment of the present invention provides a kind of configuration device of animation resource, including:
Picture acquisition module, for obtaining according to the frame configuration information for pre-entering at least the two of different frame times are allocated to
Individual picture source file;
Picture merging module, at least two pictures source file to be merged into image data, described at least two
Individual picture source file is respectively at different regional locations in the image data;
Control data generation module, for according to the frame configuration information and at least two pictures source file described
Regional location in image data generates control data;
Data classifying packing module, for by the control data and the image data be respectively stored into two it is different
In file data bag, and described two different file data bags are packaged with so as to obtain animation resource.
Fourth aspect, the embodiment of the present invention provides a kind of playing device of animation resource, including:
Animation acquisition module, for obtaining the animation resource for needing to play;
Data classification parsing module, for parsing two different file data bags, and root from the animation resource
Control data and image data are got respectively according to described two different file data bags;
Picture reading module, for being obtained respectively from the zones of different position of the image data according to the control data
To at least two picture source files;
Animation playing module, for playing at least two figure successively in different frame times according to the control data
Piece source file.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:
In the collocation method of animation resource provided in an embodiment of the present invention, first according to the frame configuration information for pre-entering
Acquisition is allocated at least two picture source files of different frame times, then at least two picture source files is merged into picture number
According in, at least two picture source files are respectively at different regional locations in image data, next match somebody with somebody confidence according to frame
The regional location of breath and at least two picture source files in image data generates control data, finally by control data and picture
Data are respectively stored into two different file data bags, and two different file data bags are packaged with so as to obtain
To animation resource.Because at least two picture source files are in after consolidation different regional locations in image data, because
After storage that control data and image data are packed respectively, two different file data bags distinguish control datas and figure for this
Sheet data, therefore needing paired domination number evidence, image data to do when updating and be easily achieved, without the need for remaking animation resource,
Simplify management to animation resource, can realize rendering optimization by the renewal of paired domination number evidence it is easy to operate, by picture number
According to renewal can realize image quality modification it is easy to operate.
In the player method of animation resource provided in an embodiment of the present invention, the animation resource for needing to play is obtained first,
Then two different file data bags are parsed from animation resource, and is obtained respectively according to two different file data bags
To control data and image data, next got respectively at least from the zones of different position of image data according to control data
Two picture source files, at least two picture source files are played successively finally according to control data in different frame times.Due to
It is to be packed respectively storage with two different file data bag paired domination number evidences and image data in animation resource, therefore is reading
Taking image data and control data can be respectively completed in two file data bags, and the playing efficiency of animation resource is higher.
Description of the drawings
Technical scheme in order to be illustrated more clearly that the embodiment of the present invention, below will be to making needed for embodiment description
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those skilled in the art, can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 is a kind of process blocks schematic diagram of the collocation method of animation resource provided in an embodiment of the present invention;
Fig. 2 is a kind of process blocks schematic diagram of the player method of animation resource provided in an embodiment of the present invention;
Fig. 3-a are the application scenarios schematic diagram of multiple picture source files provided in an embodiment of the present invention;
Fig. 3-b are a kind of application scenarios schematic diagram of the image data after merging provided in an embodiment of the present invention;
Fig. 4 is the operation interface signal that the collocation method of animation resource provided in an embodiment of the present invention is applied to configuration tool
Figure;
Fig. 5 is that flow process is shown for a kind of collocation method the realizing under application scenarios of animation resource provided in an embodiment of the present invention
It is intended to;
Fig. 6 is to realize that flow process is shown under a kind of application scenarios of the player method of animation resource provided in an embodiment of the present invention
It is intended to;
Fig. 7-a are a kind of composition structural representation of the configuration device of animation resource provided in an embodiment of the present invention;
Fig. 7-b are the composition structural representation of the configuration device of another kind of animation resource provided in an embodiment of the present invention;
Fig. 8-a are a kind of composition structural representation of the playing device of animation resource provided in an embodiment of the present invention;
Fig. 8-b are the composition structural representation of the playing device of another kind of animation resource provided in an embodiment of the present invention;
Fig. 9 is the composition structural representation that the collocation method of animation resource provided in an embodiment of the present invention is applied to server
Figure;
Figure 10 is the composition structural representation that the player method of animation resource provided in an embodiment of the present invention is applied to terminal.
Specific embodiment
A kind of collocation method, the playing method and device of animation resource are embodiments provided, for simplifying to dynamic
Draw resource management, image quality change and render optimization it is simple to operation.
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present invention
Accompanying drawing in embodiment, is clearly and completely described, it is clear that disclosed below to the technical scheme in the embodiment of the present invention
Embodiment be only a part of embodiment of the invention, and not all embodiments.Based on the embodiment in the present invention, this area
The every other embodiment that technical staff is obtained, belongs to the scope of protection of the invention.
Term " comprising " and " having " in description and claims of this specification and above-mentioned accompanying drawing and they
Any deformation, it is intended that cover it is non-exclusive includes, so as to include a series of units process, method, system, product or set
It is standby to be not necessarily limited to those units, but may include clearly not list or for these processes, method, product or equipment are solid
Other units having.
It is described in detail individually below.
One embodiment of the collocation method of animation resource of the present invention, specifically can apply to the process of configuring animations resource
In, it is easy to the management to animation resource, refer to shown in Fig. 1, the configuration side of the animation resource that one embodiment of the invention is provided
Method, may include steps of:
101st, at least two picture source files for being allocated to different frame times are obtained according to the frame configuration information for pre-entering.
In embodiments of the present invention, picture source file refers to the picture for needing to play in animation application scenarios, picture source document
The form of part can have various, can be high image quality picture, or low image quality picture, generally can play suitable according to animation
At least two picture source files are allocated to different frame times by sequence, are got according to priority playing sequence according to frame configuration information
At least two picture source files, wherein frame configuration information can be by user inputs, it is also possible to according to the configuration device of animation resource
The parameter of middle acquiescence carrys out incoming frame configuration information, and such as frame configuration information can include:The information such as frame number, every frame period.In reality
In the application of border, being allocated at least two picture source files of different frame times can name each picture using different numerals
Source file, then the playing sequence of each source file determined by the numerical order in title.
102nd, at least two picture source files are merged into image data, at least two picture source files are in image data
In be respectively at different regional locations.
In embodiments of the present invention, after getting at least two picture source files, at least two picture source files are closed
And in image data, at least two picture source files are respectively at different regional locations in image data, concrete synthesis
The Breadth Maximum and maximum height of image data afterwards can determine according to concrete application scene, by multiple picture source documents
The union operation of part so that multiple picture source files can be merged into an image data, subsequently only needs to storage in storage
The image data, without the need for storing to each picture source file again, by merging the figure that multiple picture source files are obtained
Sheet data can be specifically the image data of high image quality.Illustrate, picture source file can be 6, respectively source picture 1,
Source picture 2, source picture 3, source picture 4, source picture 5, source picture 6, then this 6 source pictures can be merged into an image data
In, the image data is picture that will be big than the width and height of source picture, source picture 1 in image data after merging,
Source picture 2, source picture 3, source picture 4, source picture 5, source picture 6 correspond respectively to the zones of different position in image data, respectively
The regional location of individual source picture can be represented by the area coordinate in image data, then can be with by the lookup of regional location
Each source picture is got from image data.
In some embodiments of the invention, at least two picture source files are merged into image data it by step 102
Afterwards, the collocation method of animation resource provided in an embodiment of the present invention also comprises the steps:
A1, enter row format to image data according to preset picture format transformation and change so as to generate the picture of specified format
Data.
Specifically, obtained after image data by merging multiple picture source files in the embodiment of the present invention, the picture number
The textural characteristics of all picture source files are included according in, if user has particular/special requirement to the form of picture, or picture is drawn
Engine is merely able to recognize the picture of certain or some special formats, composing picture source file can also be obtained in the embodiment of the present invention
To image data enter row format conversion, so as to facilitate picture drawing engine to render to the image data of specified format
Optimization, timely drawing engine occurs to update or changes, it is also possible to is converted to the image data of specified format by picture, makes
Obtaining all drawing engines can support to read and draw, and drawing engine need not do any adaptation and just can be provided with playing animation
Source.Illustrate, the image data obtained by merging multiple picture source files in the embodiment of the present invention is TGA (Tagged
Graphics) file, this is a kind of conventional high-quality picture format, if the drawing engine changed is not supported to read drawn
TGA files, but it supports bmp (bitmap) file, at this moment just TGA files can be converted into bmp files, allows the animation resource can
To play on new drawing engine.
103rd, the regional location according to frame configuration information and at least two picture source files in image data generates control
Data.
In embodiments of the present invention, after at least two picture source files are merged into image data, need record every
Regional location of the individual picture source file in image data, by each corresponding regional location of picture source file and frame confidence is matched somebody with somebody
Breath regeneration control data, the control data is used to describe the situation of change of animation, and by the control data picture can be instructed
How data play out, and region position of each picture source file in image data is also carried in control data
Put, therefore can indicate that how animation finishes playing in the control data for generating.
In some embodiments of the invention, control data includes:The store path of image data, at least two picture sources
The residing respectively regional location in image data of file, animation playing duration, animation broadcasting time, animation are after finishing
No hiding broadcast window.Specifically, can come as needed in actual applications one kind that flexible configuration control data includes or
Various data contents, wherein, the store path of image data can be with write control data, can so as to pass through parsing control data
To get the store path of image data, animation playing duration refers to the total length of time that animation resource is played, and animation is played
Number of times refers to the number of times that animation resource is played, and can be configured according to user's needs, and whether animation is hidden after finishing is played
Window can also be configured by user, or by the way of default configuration, not limited herein.
In some embodiments of the invention, step 103 is being schemed according to frame configuration information and at least two picture source files
Regional location in sheet data generates control data, specifically may include steps of:
B1, the regional location according to frame configuration information and at least two picture source files in image data, according to can expand
Exhibition markup language (Extensible Markup Language, XML) form generates control data.
Specifically, the regional location by frame configuration information and at least two picture source files in image data generates control
During data processed, the control data can be exported according to XML format, the control data of XML format is text, is easy to control
The later stage of data processed updates, such as multiple control datas just be able to can be completed when merging by the modification of text, separately
Outer control data can also carry out manual editing by user, and preserving after the completion of text editor i.e. can be in animation resource
Come into force, and without the need for generating animation resource again.
104th, control data and image data are respectively stored into two different file data bags, and by two differences
File data bag be packaged with so as to obtain animation resource.
In embodiments of the present invention, in order to change prior art in image data mix with control data together with storage
Mode, in the embodiment of the present invention after image data and control data is generated respectively, control data and image data is distinguished
Store in two different file data bags, and two different file data bags are packaged with so as to obtain animation money
Source.In the prior art, file data be generally divided into from the beginning to the end file header (form definition), file body (file data),
End-of-file (other), the length of starting position and image data of the meeting recordable picture data in file body inside file header
Degree, likewise, file header the inside also has position and the length of control data, therefore in the prior art file body is common note
Record has image data and control data, and the differentiation of image data and control data is described by the flag in file header,
This is the current general file data genaration mode for adopting, and the embodiment of the present invention is generated using diverse file data therewith
Mode, changes the usual thinking that image data and control data in prior art mix storage, and in prior art each
Picture source file is stored directly in file body, and the embodiment of the present invention first merges operation to multiple picture source files, so as to
An image data is generated, this just separates storage and provides prerequisite for image data and control data so that in storage figure
There is no longer multiple picture source files in the packet of piece file, but the image data after merging that is only stored with, but after merging
Image data in preserve the textural characteristics of all picture source files, each picture source document can be restored by the picture file
Part.By composing picture source file and image data, the separation storage of control data in the embodiment of the present invention, change existing
Animation resource configuration mode so that according to the embodiment of the present invention configure animation resource can include two different files
Packet, the renewal to image data, control data is easily realized, without the need for regenerating animation resource.
By description of the above example to the embodiment of the present invention, obtained according to the frame configuration information for pre-entering first
At least two picture source files for being allocated to different frame times are taken, then at least two picture source files image data is merged into
In, at least two picture source files are respectively at different regional locations in image data, next according to frame configuration information
Regional location with least two picture source files in image data generates control data, finally by control data and picture number
According to being respectively stored into two different file data bags, and two different file data bags are packaged with so as to obtain
Animation resource.Because at least two picture source files are in after consolidation different regional locations in image data, therefore
After storage that control data and image data are packed respectively, two different file data bag difference control datas and picture
Data, therefore needing paired domination number evidence, image data to do when updating and be easily achieved, without the need for remaking animation resource, letter
Change management to animation resource, can realize rendering optimization by the renewal of paired domination number evidence it is easy to operate, by image data
Renewal can realize image quality modification it is easy to operate.
It is illustrated from the configuration manufacturing process of animation resource in previous embodiment, next to by present invention enforcement
The animation resource that example is produced is played out, and specifically, is referred to shown in Fig. 2, the animation money that one embodiment of the invention is provided
The player method in source, may include steps of:
201st, the animation resource for needing to play is obtained.
In embodiments of the present invention, first input needs the animation resource played, and the animation resource can be by web service
Device is provided by user's program request, and for example when the user accesses a web page, animation interested in oneself is clicked on, then can be led to
Cross web page server to download to animation resource, the animation resource in the embodiment of the present invention can be based on matching somebody with somebody shown in aforementioned Fig. 1
Method generation is put, the generating process of concrete animation resource refers to the illustration of previous embodiment, and here is omitted.
In some embodiments of the invention, control data includes:The store path of image data, at least two picture sources
The residing respectively regional location in image data of file, animation playing duration, animation broadcasting time, animation are after finishing
No hiding broadcast window.Specifically, can come as needed in actual applications one kind that flexible configuration control data includes or
Various data contents, wherein, the store path of image data can be with write control data, can so as to pass through parsing control data
To get the store path of image data, animation playing duration refers to the total length of time that animation resource is played, and animation is played
Number of times refers to the number of times that animation resource is played, and can be configured according to user's needs, and whether animation is hidden after finishing is played
Window can also be configured by user, or by the way of default configuration, not limited herein.
202nd, two different file data bags are parsed from animation resource, and according to two different file data bags
Control data and image data are got respectively.
In embodiments of the present invention, after getting animation resource to be played, the animation money described by previous embodiment
The packing generating mode in source is understood, is generated by the packing of two different file data bags in the animation resource, therefore this is moved
After picture resource is parsed, two different file data bags can be respectively got, each file data bag is individually solved
Analysis, can get control data and image data, control data and figure in the embodiment of the present invention from two file data bags
Sheet data is to separate storage, therefore can get complete control data and complete by each independent file data bag
Image data, the acquisition process of control data and image data can carry out simultaneously, it is also possible to according to the place of processor
Reason ability successively gets, this with prior art in by the flag of resolution file head control data is read from file body with
And the image data for mixing therewith together is the implementation for differing completely, control data and picture in the embodiment of the present invention
The separate storage of data so that the more convenient operation of the acquisition of paired domination number evidence and image data, and paired domination number evidence and picture
The renewal of data can also be realized easily.
203rd, at least two picture source files are got respectively from the zones of different position of image data according to control data.
In embodiments of the present invention, after getting control data and image data, due to carrying in the control data
There is a regional positional information of image data, therefore can be from the not same district of image data according to the instruction of control data
Domain position gets respectively at least two picture source files, and these picture source files are allocated to different frame times, so as to
The broadcasting sequencing of these picture source files is determined that.
In some embodiments of the invention, step 202 parses two different file data bags from animation resource,
And got respectively after control data and image data according to two different file data bags, the embodiment of the present invention is except holding
Outside row step 203, can also comprise the steps:
C1, enter row format to image data according to preset picture format transformation and change so as to generate the picture of specified format
Data.
Specifically, control data and image data are respectively obtained from two different file data bags in the embodiment of the present invention
Afterwards, the textural characteristics of all picture source files are included in the image data, if user has particular/special requirement to the form of picture,
Or picture drawing engine is merely able to recognize the picture of certain or some special formats, can also be to picture in the embodiment of the present invention
Data enter row format conversion, so as to facilitate picture drawing engine to carry out rendering optimization to the image data of specified format, and
When drawing engine occur to update or change, it is also possible to the image data of specified format is converted to by picture so that all
Drawing engine can be supported to read and draw, and drawing engine need not do any adaptation just can be with playing animation resource.
Further, the present invention perform abovementioned steps C1 realize scene under, step 203 is according to control data from picture
The zones of different position of data gets respectively at least two picture source files, specifically includes following steps:
D1, at least two figures are got respectively from the zones of different position of the image data of specified format according to control data
Piece source file.
Wherein, if the embodiment of the present invention has also carried out form conversion to image data, such as from the image data of high image quality
The image data of low image quality is converted to, then the image data of the low image quality is exactly the image data of specified format, is extracting picture
Can obtain from the zones of different position of the image data of specified format during source file, picture source file can obtained from
The image quality for meeting specified format is required.
In some embodiments of the invention, step 203 is divided according to control data from the zones of different position of image data
At least two picture source files are not got, including:
E1, the interface for calling picture drawing engine, picture is successively read according to control data by picture drawing engine
In at least two picture source files of zones of different position in data.
Wherein, the Outside Access that the reading of picture source file can be provided by picture drawing engine in the embodiment of the present invention
Interface after getting image data and control data, calls the interface of picture drawing engine completing, logical according to control data
Cross picture drawing engine and be successively read in image data at least two picture source files for being in zones of different position, picture is painted
Engine processed can be the bottom drawing engine in the playing device of animation resource, can be from figure by the interface of picture drawing engine
Picture source file is quickly read in sheet data.
204th, at least two picture source files are played successively in different frame times according to control data.
In embodiments of the present invention, after getting at least two picture source files, can be with guidance diagram according to control data
The broadcasting of piece source file, for example, determine the various parameters of broadcast interface, the playing duration of picture source file, broadcast according to control data
Number of times etc. is put, is not specifically limited herein.The configuration mode of animation resource is differed with prior art in the embodiment of the present invention, base
Realize that animation playing method is also differed with prior art in this new animation resource, therefore animation in the embodiment of the present invention
Broadcasting can be adapted to various drawing engines, and the renewal of paired domination number evidence and image data can be realized.
In some embodiments of the invention, step 204 is played successively at least according to control data in different frame times
Two picture source files, specifically may include steps of:
F1, the first picture source file read between when the current frame according to control data broadcasting, and while start clock;
F2, when clock is reached, detection lapse of time determines the need for playing next frame according to control data, if
Need to play next frame, second picture source file is read from image data, and according to aforementioned playout the first picture source file
Mode continue play second picture source file, when meet control data instruction stop condition when, stop playing pictures source document
Part.
Specifically, in some embodiments of the invention, the image data for parsing from animation resource can include many
Individual picture source file, to be wherein allocated to the first picture source file and the broadcasting of second picture source file of two neighboring frame time
As a example by illustrate, other image datas in image data play can also refer to step F1 to step F2 in description,
Play the first picture source file read between when the current frame according to control data first, and while start clock, the first figure
When piece source file is played in broadcast interface, backstage can carry out timing to clock, when clock is reached, detect lapse of time,
Determined the need for playing next frame according to control data, if desired play next frame, the second figure is read from image data
Piece source file, and the mode according to aforementioned playout the first picture source file continues broadcasting second picture source file, that is, re-execute
Step F1 when the stop condition of control data instruction is met, stops playing pictures source file playing second picture source file,
The stop condition can be that playing duration reaches maximum duration, or playing pictures frame number reaches maximum frame number etc., does not do herein
Limit.
By description of the above example to the embodiment of the present invention, the animation resource for needing to play is obtained first, so
Parse two different file data bags from animation resource afterwards, and got respectively according to two different file data bags
Control data and image data, next get respectively at least two according to control data from the zones of different position of image data
Individual picture source file, at least two picture source files are played successively finally according to control data in different frame times.Due to
It is to be packed respectively storage with two different file data bag paired domination number evidences and image data in animation resource, therefore is reading
Image data and control data can be respectively completed in two file data bags, and the playing efficiency of animation resource is higher.
For ease of being better understood from and implementing the such scheme of the embodiment of the present invention, corresponding application scenarios of illustrating below come
It is specifically described.The embodiment of the present invention can realize the separation management of image data and control data in animation resource.Utilize
The present invention, can be reformed with the animation resource brought of the picture drawing engine that is subject to variation in effectively solving project development process and be asked
Topic, animation resource be describe animation partial data information, such as one gif file, it contain animation image data and
Control data, and facilitate drawing engine to render optimization, resource multiplex can also reduce software installation bag size, the picture of animation
Data refer to the pixel data represented in animation, are description, the data acquisition system of reference of color value or color.The control number of animation
According to referring to how description animation changes, by controlling image data come the behavior of instruction animation.In addition, in development process
In, product personnel if it is desired to update animation effect (such as improve image quality, reduce animation file scale etc.), as long as also spending very
Little human cost.Image data and control data are separated and (can beaten again during product issue by the technical scheme that the present invention is provided
Be wrapped together), although be a kind of new animated format, but and do not need picture drawing engine do specific adaptation, can easily do
Update and be multiplexed.
In order to realize management of the embodiment of the present invention to animation resource, the configuration of animation resource provided in an embodiment of the present invention
Method can apply to configuration tool, and the configuration tool is the work that can be created, edit animation, separating image data and control data
Tool, using instrument editor's animation, refers to shown in Fig. 3-a, is the application of multiple picture source files provided in an embodiment of the present invention
Schematic diagram of a scenario, Fig. 3-b are a kind of application scenarios schematic diagram of the image data after merging provided in an embodiment of the present invention.Make
During animation, first the source picture of each frame is drawn by user, and the picture format (such as TGA) using high image quality preserves into figure
Piece source file, TGA (Tagged Graphics) form is a kind of image file format, becomes the common format of high quality graphic.
For multiple picture source files by play order, with numeral as each file designation, as shown in Fig. 3-a, from 01.tga to
12.tga, has 12 picture source files, and file name illustrates the playing sequence of picture.Multiple picture source files are closed
And operate, so as to obtain the merging shown in Fig. 3-b after image data, the image data it is entitled:sample_1_
12.tga, in image data after merging, each picture source file is to having a regional location, such as figure of 01.tga
Piece source file is corresponding to the first picture textural characteristics of the first row in sample_1_12.tga.
As shown in figure 4, the collocation method for animation resource provided in an embodiment of the present invention is applied to the operation of configuration tool
Interface schematic diagram.Click on and generate button, instrument will export three files:1st, TFC (the Tenio Frame of record control data
Config) file, the configuration of TFC Chinese name Tenio frames.2nd, the high image quality version picture file (such as TGA) of image data.3rd, refer to
The picture data files (all frame pictures merge, and size is 2 power) of the formula of fixing/image quality.For example, it is intended that form can be png
Form, this form is the form to be exported that user selects, and TGA is then the high image quality output of acquiescence, no matter have selected that
Output format is changed, and instrument all can simultaneously export a TGA as the backup of image data.In the diagram, can configure defeated
Go out the filename of control data:Sample, picture format:Png is the format transformation specified, and the maximum of the image data of synthesis is wide
Degree and maximum height can be arranged according to application scenarios, and whether automatic cycle is automatic when playing and specify broadcasting time, stopping
Hide and wait frame configuration information to adopt the default configuration of configuration tool, or flexibly selected by user, in Fig. 4, to scheme
Sheet data has 12 frames, wherein, present frame is as a example by the display of the 10th frame.
Can be required according to different image quality in the embodiment of the present invention, export the image data of different-format.The figure of output
Sheet data is to merge to obtain from the picture source file of each frame, and such as png is exactly the output file obtained after merging.To scheme
As a example by 4, this picture for showing the animation of " S " and having 12 frames, each frame is all stored in a pictures source file, it is possible to use this
They are merged into the image data of png forms and the image data of TGA forms for the configuration tool that inventive embodiments are provided.Equally
, because there is the high image quality version TGA files of image data, if drawing engine is in need, it is possible to use instrument is by TGA files
Batch changes into the picture file of arbitrary format.The separation of control data and image data so that the version management to animation is non-
It is often simple.In addition, the image data of output supports common form, as long as so drawing engine is supported to read in common format
A certain kind, with regard to energy playing animation, it is not necessary to do any adaptation work.In reality scene, the drawing engine of project team is often only propped up
Static images are held, to realize that dynamic picture generally requires to write the code of special adaptation, the embodiment of the present invention can eliminate this
Work.
Refer to shown in Fig. 5, be the collocation method of animation resource provided in an embodiment of the present invention under a kind of application scenarios
Realize schematic flow sheet.Next realize that process is illustrated with separate image data and control data, need to carry
User is allowed to make animation for an instrument, and when animation is generated, by this instrument by the image data and control data of animation
Separate and preserve.
One use of the Tool integration is increased income the image library that image library Cximage and DirectX are realized, each to support
The picture of kind of form, when generating animation, instrument first based on primitive frame picture, according to instrument arrange parameter, using image
Frame picture is merged into a lossless high image quality image data by storehouse, and then image library is again with this high image quality image data as number
According to source, the image data of specified format is converted it to.Meanwhile, using storehouse TinyXml storehouses of increasing income, the control that instrument is set
Data preserve into xml forms and store in file.The data that image library is used when running for project software, TinyXml is write
With parsing XML format file, the control data of TFC forms is preserved into XML format.
Next the file format of paired domination number evidence is illustrated, and the logical code of such as control data is as follows:
Wherein, illustrated from the logical code of above-mentioned control file, each animation is have recorded in control data
The details of frame:The store path of image data is quoted, the regional location of picture, playing duration is quoted, broadcasting time, is finished
The control information such as whether hide.This control data is the entry file of animation, and user is concerned about this file without concern for picture
File, and quoting picture region this parameter can then improve the multiplexing of picture.Because this is text, can also
Manual editing, it is also very convenient when Piece file mergence is done.Because being text, various Version Management Softwares are all supported to merge.
Next the file pattern of image data is illustrated, the image data of a specified format, this figure
Piece is that all animation frames are incorporated in a textural characteristics, preserves the power that size is 2, and the two means can help picture to draw
Engine renders optimization.Due to being static images, drawing engine all can be supported to read and draw, so drawing engine need not do
Any adaptation can playing animation.
Previous embodiment has carried out illustrated in greater detail to the configuration process of animation resource, and next animation resource is broadcast
Let slip journey to be illustrated, refer to shown in Fig. 6, be one kind of the player method of animation resource provided in an embodiment of the present invention
Schematic flow sheet is realized under application scenarios.
First have to realize an animation component, its effect is to read parsing control data, clock readjustment, according to control
The interface of data call picture drawing engine processed reads, draws picture to painting canvas.This general purpose module causes picture drawing engine
Only drawn with the reading for being concerned about static images, without other things for being concerned about animation.Wherein, the upper layer logic in Fig. 6 is referred to
Using the item code of this scheme, such as the flash animation of " game winnings " is played in center Screen.Upper strata is patrolled
Volume call and can read animation resource provided in an embodiment of the present invention, in software running process, when needing playing animation
When, can specifically perform following steps:
S01, upper layer logic call the playback interface of animation component, incoming animation control data (i.e. TFC files) path.
S02, animation component parsing XML file, read picture path, region, time interval of each frame animation etc..XML
File is the preservation form of TFC files.
S03, animation component call the interface of picture drawing engine, allow picture drawing engine to read the first frame figure of drafting
Piece source file, while starting clock.
S04, animation component when the hour reach when, detection lapse of time, it is determined whether need to play next frame, if
Need, then notify that picture drawing engine reads the picture source file for drawing next frame.
S05, S04 is repeated until meeting the stop condition that control data is specified.
The embodiment of the present invention can solve drawing engine change in project development process, require to update animation image quality and cause
Animation resource is reformed problem, friendly to various drawing engines, realizes that animation does not need extra adaptation work.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention do not limited by described sequence of movement because
According to the present invention, some steps can adopt other orders or while carry out.Secondly, those skilled in the art also should know
Know, embodiment described in this description belongs to preferred embodiment, involved action and module is not necessarily of the invention
It is necessary.
For ease of the such scheme for preferably implementing the embodiment of the present invention, the phase for implementing such scheme is also provided below
Close device.
Refer to shown in Fig. 7-a, a kind of configuration device 700 of animation resource provided in an embodiment of the present invention can include:
Picture acquisition module 701, picture merging module 702, control data generation module 703 and data classifying packing module 704, its
In,
Picture acquisition module 701, different frame times are allocated to extremely for obtaining according to the frame configuration information for pre-entering
Few two picture source files;
Picture merging module 702, at least two pictures source file to be merged into image data, it is described at least
Two picture source files are respectively at different regional locations in the image data;
Control data generation module 703, for being existed according to the frame configuration information and at least two pictures source file
Regional location in the image data generates control data;
Data classifying packing module 704, for the control data and the image data to be respectively stored into two not
In same file data bag, and described two different file data bags are packaged with so as to obtain animation resource.
In some embodiments of the invention, refer to shown in Fig. 7-b, the configuration device 700 of the animation resource is also wrapped
Include:Format converting module 705, wherein,
The format converting module 705, closes at least two pictures source file for the picture merging module 702
And in image data after, according to preset picture format transformation the image data is entered row format conversion refer to so as to generate
The image data of the formula that fixes.
In some embodiments of the invention, the control data generation module 703, specifically for being configured according to the frame
The regional location of information and at least two pictures source file in the image data, according to expandable mark language XML
Form generates control data.
In some embodiments of the invention, the control data includes:The store path of the image data, it is described extremely
The residing respectively regional location in the image data of few two picture source files, animation playing duration, animation broadcasting time,
Whether animation hides broadcast window after finishing.
By description of the above example to the embodiment of the present invention, obtained according to the frame configuration information for pre-entering first
At least two picture source files for being allocated to different frame times are taken, then at least two picture source files image data is merged into
In, at least two picture source files are respectively at different regional locations in image data, next according to frame configuration information
Regional location with least two picture source files in image data generates control data, finally by control data and picture number
According to being respectively stored into two different file data bags, and two different file data bags are packaged with so as to obtain
Animation resource.Because at least two picture source files are in after consolidation different regional locations in image data, therefore
After storage that control data and image data are packed respectively, two different file data bag difference control datas and picture
Data, therefore needing paired domination number evidence, image data to do when updating and be easily achieved, without the need for remaking animation resource, letter
Change management to animation resource, can realize rendering optimization by the renewal of paired domination number evidence it is easy to operate, by image data
Renewal can realize image quality modification it is easy to operate.
Refer to shown in Fig. 8-a, a kind of playing device 800 of animation resource provided in an embodiment of the present invention can include:
Animation acquisition module 801, data classification parsing module 802, picture reading module 803 and animation playing module 804, wherein,
Animation acquisition module 801, for obtaining the animation resource for needing to play;
Data classification parsing module 802, for parsing two different file data bags from the animation resource, and
Control data and image data are got respectively according to described two different file data bags;
Picture reading module 803, for being distinguished from the zones of different position of the image data according to the control data
Get at least two picture source files;
Animation playing module 804, for described in being played successively in different frame times according to the control data at least two
Individual picture source file.
In some embodiments of the invention, refer to shown in Fig. 8-b, the playing device 800 of the animation resource is also wrapped
Include:Format converting module 805, wherein,
The format converting module 805, parses for data classification parsing module 802 from the animation resource
Two different file data bags, and control data and picture number are got respectively according to described two different file data bags
According to after, enter row format to the image data according to preset picture format transformation and change so as to generate the picture of specified format
Data;
The picture reading module 803, specifically for according to the control data from the image data of the specified format
Zones of different position get at least two picture source files respectively.
In some embodiments of the invention, the picture reading module 803, specifically for calling picture drawing engine
Interface, is successively read in the image data by the picture drawing engine according to the control data and is in zones of different
At least two picture source files of position.
In some embodiments of the invention, the animation playing module 804, specifically for being broadcast according to the control data
The the first picture source file read between being placed on when the current frame, and while start clock;When the clock is reached, detection is flowed
Die the time, determined the need for playing next frame according to the control data, next frame is if desired played, from the image data
In read second picture source file, and the mode according to aforementioned playout the first picture source file continues to play the second picture
Source file, when the stop condition that the control data is indicated is met, stops playing pictures source file.
In some embodiments of the invention, the control data includes:The store path of the image data, it is described extremely
The residing respectively regional location in the image data of few two picture source files, animation playing duration, animation broadcasting time,
Whether animation hides broadcast window after finishing.
By description of the above example to the embodiment of the present invention, the animation resource for needing to play is obtained first, so
Parse two different file data bags from animation resource afterwards, and got respectively according to two different file data bags
Control data and image data, next get respectively at least two according to control data from the zones of different position of image data
Individual picture source file, at least two picture source files are played successively finally according to control data in different frame times.Due to
It is to be packed respectively storage with two different file data bag paired domination number evidences and image data in animation resource, therefore is reading
Image data and control data can be respectively completed in two file data bags, and the playing efficiency of animation resource is higher.
Fig. 9 is a kind of server architecture schematic diagram provided in an embodiment of the present invention, and the server 1100 can be because of configuration or property
Can the different and larger difference of producing ratio, one or more central processing units (central processing can be included
Units, CPU) 1122 (for example, one or more processors) and memory 1132, one or more storage applications
The storage medium 1130 (such as one or more mass memory units) of program 1142 or data 1144.Wherein, memory
1132 and storage medium 1130 can be of short duration storage or persistently storage.Being stored in the program of storage medium 1130 can include one
Individual or more than one module (diagram is not marked), each module can include operating the series of instructions in server.More enter
One step ground, central processing unit 1122 could be arranged to be communicated with storage medium 1130, and on server 1100 storage medium is performed
Series of instructions operation in 1130.
Server 1100 can also include one or more power supplys 1126, one or more wired or wireless nets
Network interface 1150, one or more input/output interfaces 1158, and/or, one or more operating systems 1141, example
Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
The step of collocation method of the animation resource in above-described embodiment by performed by server, can be based on shown in the Fig. 9
Server architecture.
The embodiment of the present invention additionally provides another kind of terminal, as shown in Figure 10, for convenience of description, illustrate only and this
The related part of bright embodiment, particular technique details is not disclosed, and refer to present invention method part.The terminal can be with
It is to include mobile phone, panel computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of
Sales, point-of-sale terminal), the arbitrarily terminal device such as vehicle-mounted computer, so that terminal is as mobile phone as an example:
Figure 10 is illustrated that the block diagram of the part-structure of the mobile phone related to terminal provided in an embodiment of the present invention.With reference to figure
10, mobile phone includes:Radio frequency (Radio Frequency, RF) circuit 1010, memory 1020, input block 1030, display unit
1040th, sensor 1050, voicefrequency circuit 1060, Wireless Fidelity (wireless fidelity, WiFi) module 1070, processor
The part such as 1080 and power supply 1090.It will be understood by those skilled in the art that the handset structure illustrated in Figure 10 do not constitute it is right
The restriction of mobile phone, can include part more more or less of than diagram, or combine some parts, or different part cloth
Put.
Each component parts of mobile phone is specifically introduced with reference to Figure 10:
RF circuits 1010 can be used to receiving and sending messages or communication process in, the reception and transmission of signal, especially, by base station
After downlink information is received, process to processor 1080;In addition, up data is activation will be designed to base station.Generally, RF circuits
1010 include but is not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise
Amplifier, LNA), duplexer etc..Additionally, RF circuits 1010 can also be logical with network and other equipment by radio communication
Letter.Above-mentioned radio communication can be using arbitrary communication standard or agreement, including but not limited to global system for mobile communications
(GlobalSystem of Mobile communication, GSM), general packet radio service (General Packet
Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), WCDMA
(Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution,
LTE), Email, Short Message Service (Short Messaging Service, SMS) etc..
Memory 1020 can be used to store software program and module, and processor 1080 is stored in memory by operation
1020 software program and module, so as to perform various function application and the data processing of mobile phone.Memory 1020 can be led
To include storing program area and storage data field, wherein, storing program area can be needed for storage program area, at least one function
Application program (such as sound-playing function, image player function etc.) etc.;Storage data field can store the use institute according to mobile phone
Data (such as voice data, phone directory etc.) of establishment etc..Additionally, memory 1020 can be stored including high random access
Device, can also include nonvolatile memory, and for example, at least one disk memory, flush memory device or other volatibility are consolidated
State memory device.
Input block 1030 can be used for the numeral or character information of receives input, and produce with the user of mobile phone arrange with
And the key signals input that function control is relevant.Specifically, input block 1030 may include contact panel 1031 and other inputs
Equipment 1032.Contact panel 1031, also referred to as touch-screen, can collect user thereon or neighbouring touch operation (such as user
Using the behaviour of any suitable object such as finger, stylus or annex on contact panel 1031 or near contact panel 1031
Make), and corresponding attachment means are driven according to formula set in advance.Optionally, contact panel 1031 may include touch detection
Two parts of device and touch controller.Wherein, touch detecting apparatus detect the touch orientation of user, and detect touch operation band
The signal for coming, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
Contact coordinate is converted into, then gives processor 1080, and the order sent of receiving processor 1080 and can be performed.Additionally,
Contact panel 1031 can be realized using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except touch surface
Plate 1031, input block 1030 can also include other input equipments 1032.Specifically, other input equipments 1032 can include
But in being not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc.
One or more.
Display unit 1040 can be used for show by user input information or be supplied to user information and mobile phone it is each
Plant menu.Display unit 1040 may include display floater 1041, optionally, can adopt liquid crystal display (Liquid
Crystal Display, LCD), the form such as Organic Light Emitting Diode (Organic Light-EmittingDiode, OLED) comes
Configuration display floater 1041.Further, contact panel 1031 can cover display floater 1041, when contact panel 1031 is detected
Thereon or after neighbouring touch operation, processor 1080 is sent to determine the type of touch event, with preprocessor 1080
Corresponding visual output is provided on display floater 1041 according to the type of touch event.Although in Fig. 10, contact panel
1031 with display floater 1041 be as two independent parts realizing input and the input function of mobile phone, but in some realities
In applying example, can by contact panel 1031 and display floater 1041 be integrated input that realize mobile phone and output function.
Mobile phone may also include at least one sensor 1050, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ambient light
Light and shade adjusting the brightness of display floater 1041, proximity transducer can close display floater when mobile phone is moved in one's ear
1041 and/or backlight.Used as one kind of motion sensor, (generally three axles) add in the detectable all directions of accelerometer sensor
The size of speed, can detect that size and the direction of gravity when static, can be used to recognize application (the such as horizontal/vertical screen of mobile phone attitude
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;As for mobile phone also
The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, will not be described here.
Voicefrequency circuit 1060, loudspeaker 1061, microphone 1062 can provide the COBBAIF between user and mobile phone.Audio frequency
Electric signal after the voice data for receiving conversion can be transferred to loudspeaker 1061 by circuit 1060, be changed by loudspeaker 1061
For voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 1062, by voicefrequency circuit 1060
Voice data is converted to after reception, then after voice data output processor 1080 is processed, Jing RF circuits 1010 are being sent to ratio
Such as another mobile phone, or voice data is exported to memory 1020 so as to further process.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronicses postal by WiFi module 1070
Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.Although Figure 10 shows
WiFi module 1070, but it is understood that, it is simultaneously not belonging to must be configured into for mobile phone, can not change as needed completely
Become in the essential scope of invention and omit.
Processor 1080 is the control centre of mobile phone, using various interfaces and the various pieces of connection whole mobile phone,
By operation or perform and be stored in software program and/or module in memory 1020, and call and be stored in memory 1020
Interior data, perform the various functions and processing data of mobile phone, so as to carry out integral monitoring to mobile phone.Optionally, processor
1080 may include one or more processing units;Preferably, processor 1080 can integrated application processor and modulation /demodulation process
Device, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor is mainly located
Reason radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1080.
Mobile phone also includes the power supply 1090 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply
Management system is logically contiguous with processor 1080, so as to realize management charging, electric discharge and power consumption pipe by power-supply management system
The functions such as reason.
Although not shown, mobile phone can also include camera, bluetooth module etc., will not be described here.
In embodiments of the present invention, the processor 1080 included by the terminal also there is control to perform and performed by terminal above
Animation resource player method flow process.
In addition it should be noted that, device embodiment described above is only schematic, wherein described as separating
The unit of part description can be or may not be it is physically separate, can be as the part that unit shows or
Can not be physical location, you can be located at a place, or can also be distributed on multiple NEs.Can be according to reality
The purpose for needing to select some or all of module therein to realize this embodiment scheme on border.In addition, what the present invention was provided
In device embodiment accompanying drawing, the annexation between module is represented and have between them communication connection, specifically can be implemented as one
Bar or a plurality of communication bus or holding wire.Those of ordinary skill in the art are not in the case where creative work is paid, you can with
Understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be borrowed
Software is helped to add the mode of required common hardware to realize, naturally it is also possible to include special IC, specially by specialized hardware
Realized with CPU, private memory, special components and parts etc..Generally, all functions of being completed by computer program can
Easily realized with corresponding hardware, and, for realizing that the particular hardware structure of same function can also be various many
Sample, such as analog circuit, digital circuit or special circuit etc..But, it is more for the purpose of the present invention in the case of software program reality
It is now more preferably embodiment.Based on such understanding, technical scheme is substantially made to prior art in other words
The part of contribution can be embodied in the form of software product, and the computer software product is stored in the storage medium that can read
In, such as the floppy disk of computer, USB flash disk, portable hard drive, read-only storage (ROM, Read-Only Memory), random access memory
Device (RAM, Random Access Memory), magnetic disc or CD etc., including some instructions use is so that a computer sets
Standby (can be personal computer, server, or network equipment etc.) performs the method described in each embodiment of the invention.
In sum, above example is only to illustrate technical scheme, rather than a limitation;Although with reference to upper
State embodiment to be described in detail the present invention, it will be understood by those within the art that:It still can be to upper
State the technical scheme described in each embodiment to modify, or equivalent is carried out to which part technical characteristic;And these
Modification is replaced, and does not make the spirit and scope of the essence disengaging various embodiments of the present invention technical scheme of appropriate technical solution.
Claims (18)
1. a kind of collocation method of animation resource, it is characterised in that include:
At least two picture source files for being allocated to different frame times are obtained according to the frame configuration information for pre-entering;
At least two pictures source file is merged into image data, at least two pictures source file is in the picture
Different regional locations are respectively in data;
Regional location according to the frame configuration information and at least two pictures source file in the image data is generated
Control data;
The control data and the image data are respectively stored into two different file data bags, and will be described two
Different file data bags is packaged with so as to obtain animation resource.
2. method according to claim 1, it is characterised in that described that at least two pictures source file is merged into figure
After in sheet data, methods described also includes:
Enter row format to the image data according to preset picture format transformation to change so as to generate the picture number of specified format
According to.
3. method according to claim 1, it is characterised in that described according to the frame configuration information and described at least two
Regional location of the picture source file in the image data generates control data, including:
According to the regional location of the frame configuration information and at least two pictures source file in the image data, according to
Expandable mark language XML form generates control data.
4. according to the method in any one of claims 1 to 3, it is characterised in that the control data includes:The picture
The store path of data, at least two pictures source file regional location, animation residing respectively in the image data
Whether playing duration, animation broadcasting time, animation hide broadcast window after finishing.
5. a kind of player method of animation resource, it is characterised in that include:
Obtain the animation resource for needing to play;
Two different file data bags are parsed from the animation resource, and according to described two different file data bags
Control data and image data are got respectively;
At least two picture source files are got respectively from the zones of different position of the image data according to the control data;
At least two pictures source file is played successively in different frame times according to the control data.
6. method according to claim 5, it is characterised in that it is described parse from the animation resource two it is different
File data bag, and got respectively after control data and image data according to described two different file data bags, institute
Stating method also includes:
Enter row format to the image data according to preset picture format transformation to change so as to generate the picture number of specified format
According to;
It is described that at least two picture sources are got respectively from the zones of different position of the image data according to the control data
File, including:
At least two are got respectively from the zones of different position of the image data of the specified format according to the control data
Picture source file.
7. method according to claim 5, it is characterised in that it is described according to the control data from the image data
Zones of different position gets respectively at least two picture source files, including:
The interface of picture drawing engine is called, is successively read by the picture drawing engine according to the control data described
In at least two picture source files of zones of different position in image data.
8. method according to claim 5, it is characterised in that it is described according to the control data different frame times according to
It is secondary to play at least two pictures source file, including:
The the first picture source file read between when the current frame is played according to the control data, and while starts clock;
When the clock is reached, lapse of time is detected, determined the need for playing next frame according to the control data, if
Need to play next frame, second picture source file is read from the image data, and according to the first picture of aforementioned playout source
The mode of file continues to play the second picture source file, when the stop condition that the control data is indicated is met, stops
Playing pictures source file.
9. the method according to any one of claim 5 to 8, it is characterised in that the control data includes:The picture
The store path of data, at least two pictures source file regional location, animation residing respectively in the image data
Whether playing duration, animation broadcasting time, animation hide broadcast window after finishing.
10. a kind of configuration device of animation resource, it is characterised in that include:
Picture acquisition module, for obtaining at least two figures for being allocated to different frame times according to the frame configuration information for pre-entering
Piece source file;
Picture merging module, at least two pictures source file to be merged into image data, at least two figure
Piece source file is respectively at different regional locations in the image data;
Control data generation module, for according to the frame configuration information and at least two pictures source file in the picture
Regional location in data generates control data;
Data classifying packing module, for the control data and the image data to be respectively stored into two different files
In packet, and described two different file data bags are packaged with so as to obtain animation resource.
11. devices according to claim 10, it is characterised in that the configuration device of the animation resource also includes:Form
Modular converter, wherein,
The format converting module, picture number is merged into for the picture merging module by least two pictures source file
After according in, enter row format to the image data according to preset picture format transformation and change so as to generate the figure of specified format
Sheet data.
12. devices according to claim 10, it is characterised in that the control data generation module, specifically for basis
The regional location of the frame configuration information and at least two pictures source file in the image data, according to expansible mark
Note Language XML form generates control data.
13. devices according to any one of claim 10 to 12, it is characterised in that the control data includes:It is described
The residing respectively regional location in the image data of the store path of image data, at least two pictures source file,
Whether animation playing duration, animation broadcasting time, animation hide broadcast window after finishing.
14. a kind of playing devices of animation resource, it is characterised in that include:
Animation acquisition module, for obtaining the animation resource for needing to play;
Data classification parsing module, for parsing two different file data bags from the animation resource, and according to institute
State two different file data bags and get control data and image data respectively;
Picture reading module, for according to the control data from the zones of different position of the image data get respectively to
Few two picture source files;
Animation playing module, for playing at least two pictures source successively in different frame times according to the control data
File.
15. devices according to claim 14, it is characterised in that the playing device of the animation resource also includes:Form
Modular converter, wherein,
The format converting module, for the data classify parsing module parse from the animation resource two it is different
File data bag, and got respectively after control data and image data according to described two different file data bags, press
Enter row format to the image data according to preset picture format transformation to change so as to generate the image data of specified format;
The picture reading module, specifically for according to the control data from the not same district of the image data of the specified format
Domain position gets respectively at least two picture source files.
16. devices according to claim 14, it is characterised in that the picture reading module, specifically for calling picture
The interface of drawing engine, is successively read in the image data by the picture drawing engine according to the control data and is located
In at least two picture source files of zones of different position.
17. devices according to claim 14, it is characterised in that the animation playing module, specifically for according to described
Control data plays the first picture source file read between when the current frame, and while starts clock;Reach in the clock
When, lapse of time is detected, determined the need for playing next frame according to the control data, next frame is if desired played, from
Second picture source file is read in the image data, and the mode according to aforementioned playout the first picture source file continues to play
The second picture source file, when the stop condition that the control data is indicated is met, stops playing pictures source file.
18. devices according to any one of claim 14 to 17, it is characterised in that the control data includes:It is described
The residing respectively regional location in the image data of the store path of image data, at least two pictures source file,
Whether animation playing duration, animation broadcasting time, animation hide broadcast window after finishing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610884817.9A CN106651995B (en) | 2016-10-10 | 2016-10-10 | A kind of configuration method of animation resource, playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610884817.9A CN106651995B (en) | 2016-10-10 | 2016-10-10 | A kind of configuration method of animation resource, playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106651995A true CN106651995A (en) | 2017-05-10 |
CN106651995B CN106651995B (en) | 2019-11-19 |
Family
ID=58853820
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610884817.9A Active CN106651995B (en) | 2016-10-10 | 2016-10-10 | A kind of configuration method of animation resource, playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106651995B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109766150A (en) * | 2017-11-06 | 2019-05-17 | 广州市动景计算机科技有限公司 | Implementation method, device and the terminal device of interactive animation |
CN110062271A (en) * | 2019-04-28 | 2019-07-26 | 腾讯科技(成都)有限公司 | Method for changing scenes, device, terminal and storage medium |
CN110221873A (en) * | 2019-04-24 | 2019-09-10 | 深圳点猫科技有限公司 | Language promotes the method and electronic equipment of full frame animation loading performance based on programming |
CN110223221A (en) * | 2018-02-28 | 2019-09-10 | 腾讯科技(深圳)有限公司 | A kind of method and terminal device of dynamic image broadcasting |
CN110475147A (en) * | 2019-07-29 | 2019-11-19 | 阿里巴巴集团控股有限公司 | Animation playing method, device, terminal and server |
CN110662105A (en) * | 2019-10-16 | 2020-01-07 | 广州华多网络科技有限公司 | Animation file generation method and device and storage medium |
CN110990601A (en) * | 2019-11-13 | 2020-04-10 | 珠海格力电器股份有限公司 | Image processing method and device |
CN111242688A (en) * | 2020-01-13 | 2020-06-05 | Oppo广东移动通信有限公司 | Animation resource manufacturing method and device, mobile terminal and storage medium |
CN112672180A (en) * | 2020-12-22 | 2021-04-16 | 广州博冠信息科技有限公司 | Live interface element configuration method, device, storage medium and program product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949269A (en) * | 2006-11-10 | 2007-04-18 | 北京金山软件有限公司 | Cartoon realizing method and cartoon drawing system thereof |
CN103873916A (en) * | 2012-12-13 | 2014-06-18 | 深圳市快播科技有限公司 | Video thumbnail processing method, video thumbnail processing system and video player |
CN104392474A (en) * | 2014-06-30 | 2015-03-04 | 贵阳朗玛信息技术股份有限公司 | Method and device for generating and displaying animation |
CN104866259A (en) * | 2014-02-21 | 2015-08-26 | 中兴通讯股份有限公司 | Animation display method and device and terminal |
-
2016
- 2016-10-10 CN CN201610884817.9A patent/CN106651995B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949269A (en) * | 2006-11-10 | 2007-04-18 | 北京金山软件有限公司 | Cartoon realizing method and cartoon drawing system thereof |
CN103873916A (en) * | 2012-12-13 | 2014-06-18 | 深圳市快播科技有限公司 | Video thumbnail processing method, video thumbnail processing system and video player |
CN104866259A (en) * | 2014-02-21 | 2015-08-26 | 中兴通讯股份有限公司 | Animation display method and device and terminal |
CN104392474A (en) * | 2014-06-30 | 2015-03-04 | 贵阳朗玛信息技术股份有限公司 | Method and device for generating and displaying animation |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109766150A (en) * | 2017-11-06 | 2019-05-17 | 广州市动景计算机科技有限公司 | Implementation method, device and the terminal device of interactive animation |
CN110223221A (en) * | 2018-02-28 | 2019-09-10 | 腾讯科技(深圳)有限公司 | A kind of method and terminal device of dynamic image broadcasting |
CN110223221B (en) * | 2018-02-28 | 2023-10-03 | 腾讯科技(深圳)有限公司 | Dynamic image playing method and terminal equipment |
CN110221873A (en) * | 2019-04-24 | 2019-09-10 | 深圳点猫科技有限公司 | Language promotes the method and electronic equipment of full frame animation loading performance based on programming |
CN110221873B (en) * | 2019-04-24 | 2021-02-05 | 深圳点猫科技有限公司 | Method for improving full-screen animation loading performance based on programming language and electronic equipment |
CN110062271A (en) * | 2019-04-28 | 2019-07-26 | 腾讯科技(成都)有限公司 | Method for changing scenes, device, terminal and storage medium |
CN110475147A (en) * | 2019-07-29 | 2019-11-19 | 阿里巴巴集团控股有限公司 | Animation playing method, device, terminal and server |
CN110662105A (en) * | 2019-10-16 | 2020-01-07 | 广州华多网络科技有限公司 | Animation file generation method and device and storage medium |
CN110990601A (en) * | 2019-11-13 | 2020-04-10 | 珠海格力电器股份有限公司 | Image processing method and device |
CN111242688A (en) * | 2020-01-13 | 2020-06-05 | Oppo广东移动通信有限公司 | Animation resource manufacturing method and device, mobile terminal and storage medium |
CN112672180A (en) * | 2020-12-22 | 2021-04-16 | 广州博冠信息科技有限公司 | Live interface element configuration method, device, storage medium and program product |
Also Published As
Publication number | Publication date |
---|---|
CN106651995B (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106651995A (en) | Animation resource configuration method, playback method and device | |
WO2020187086A1 (en) | Video editing method and apparatus, device, and storage medium | |
CN102834790B (en) | For the method and apparatus showing the relative motion of object on a graphical user interface | |
CN110597512B (en) | Method for displaying user interface and electronic equipment | |
CN103430140B (en) | Method and apparatus of managing items on clipboard of portable terminal | |
CN103119538B (en) | Apparatus and methods of extending application services | |
WO2016124095A1 (en) | Video generation method, apparatus and terminal | |
CN102984383A (en) | Preview method, device and mobile phone | |
CN107102936A (en) | The appraisal procedure and mobile terminal and storage medium of a kind of fluency | |
CN110557565B (en) | Video processing method and mobile terminal | |
CN103986933B (en) | Dynamic picture display methods and device | |
CN114356258A (en) | Electronic device, screen projection method thereof and medium | |
CN110377204A (en) | A kind of method and electronic equipment generating user's head portrait | |
CN102385482B (en) | Methods and apparatuses for enhancing wallpaper display | |
CN107770618A (en) | A kind of image processing method, device and storage medium | |
CN109189300A (en) | A kind of view circularly exhibiting method and apparatus | |
CN106610826A (en) | Making method and device for online scenario application | |
CN113132526A (en) | Page drawing method and related device | |
CN106714271A (en) | Wireless network access method and device | |
CN102567030B (en) | Television user interface implementation method and system | |
CN103294618B (en) | Information processor and control method | |
WO2022160965A1 (en) | Video processing method, and electronic device | |
CN107862728A (en) | Adding method, device and the computer-readable recording medium of picture tag | |
CN108022198A (en) | A kind of photo watermark dynamic management approach, device and computer-readable recording medium | |
CN116257235A (en) | Drawing method and electronic equipment |
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 |