A kind of analysis of PPT animation, the processing method for extracting and being converted to picture format
Technical field
The present invention relates to the process field of format conversion, especially a kind of PPT is converted into the preprocess method of picture format.
Background technique
Existing PPT file constitutes slide group by several lantern slides, and in addition to background, intrinsic in every lantern slide
Word content etc. can also be provided with several and the associated pattern of animation effect, text etc., and pattern and text are referred to as herein
Shape, shape and animation effect belong to the animated element in PPT file, and the animation effect in PPT is all by corresponding journey
Made of formula data are write, be it is conventional can be widely-available for users exploitation, animation effect has very much, wherein with feature significantly into
Row is sorted out, for example, shape can be with certain animation effect in some position, the rolling pulley for clicking PPT etc. operating condition
From position, the mobile form for being perhaps turned to another location perhaps shape changes or is not present in originally PPT back
The shape of scape is mobile or gradual change is faded in PPT background, and such situation may be defined as load animation effect;In certain for clicking PPT
Be inherently present in when the operating condition of a position, rolling pulley etc. in PPT background shape can from a position movement, overturning,
But it is eventually returned to original position, and form does not change, it is such to be defined as refunding effect, or it is inherently present in PPT back
Shape can be hidden, in PPT background of fading out in scape, such to be defined as hiding effect of fading out, and refund effect and hide effect of fading out
Etc. set can sort out be defined as remove animation effect;And the appearance of each element in an animation has sequencing, and
Also there is sequencing between the animation of part, general each animation effect and will form with the associated shape of the animation effect dynamic
It draws, and internal processes can carry out default sort from 1-N to each animation.
Further, animation effect can also include the case where sound, video link, this sentences the PPT file of different editions
Classify, the PPT file format compared with lowest version is ppt, wherein in the PPT file of ppt format, sound, video data can be with
It is interior chain in PPT file, is also possible to be stored in backstage by way of exterior chain, click the outer link in PPT, finds
Sound, video data to corresponding title address can play sound, video, and the PPT file format of higher-version is pptx, herein
Belong to xml document structure, herein either exterior chain resource or in chain resource, it is only necessary to reading xml document label can find
To corresponding sound, video.
There is above numerous characteristic based on PPT file, transmitted in file or can sometimes seem inconvenient using upper,
And it is not that each terminal computer is fitted with the software that can open ppt or pptx format, and picture format or routine
Sound, video format are on the contrary more common, however since the animation effect of PPT file is more complicated, it cannot simply be processed into figure
Piece format, it is therefore desirable to PPT file is pre-processed, and there is no reasonable methods now to pre-process to PPT file.
Summary of the invention
In order to solve the above technical problems, the object of the present invention is to provide animation analysis, extractions in a kind of couple of PPT in order to it
It is converted into the processing method of picture format.
The technical solution adopted by the present invention is that:
A kind of analysis of PPT animation, the processing method for extracting and being converted to picture format, comprising the following steps:
A, whole animated elements of lantern slide to be processed and lantern slide to be processed are obtained;
B, lantern slide to be processed is copied into backup file;
C, judge that each animation effect is load animation effect or removes animation effect, if the animation effect is that load is dynamic
Draw effect, then delete the animation effect and with the associated shape of the animation effect, so that initial lantern slide is generated, if the animation
Effect is to remove animation effect, then generates initial M lantern slides, and M initial value is 1;
D, n-th animation is added on M lantern slides and forms next lantern slide, M=M+1, N initial value is 1;
E, it is analyzed using animation effect of the backup file to the n-th animation of M lantern slides to guide animation effect to transport
Row forms next lantern slide, M=M+1;
F, judge whether the N+1 animation carries out after n-th animation using backup file, if so, returning to step
Rapid d, if it is not, then entering step g;
G, it will be removed in M lantern slides about the animation effect of n-th animation and recovery of shape be to animation effect fortune
Before row, next lantern slide, M=M+1, N=N+1 are formed;
H, return step d, until having handled all animations on the lantern slide;
I, picture format is converted by lantern slide.
It, will be associated with the animation effect in backup file if the animation effect is load animation effect in the step e
Shape is added in M lantern slides, removes the animation effect in M lantern slides and backup file.
In the step e, if the animation effect is to remove animation effect, judge that the animation effect is down using backup file
It returns effect and still hides effect of fading out and if refunding effect then delete animation effect;If hiding effect of fading out, then delete dynamic
Draw effect and shape.
Further include step j between the step e and step f, detected using backup file and readjusts M parts of lantern slides
The animated element of N number of animation puts in order middlely.
For several slide groups to be processed at slide group, the upper lantern slide to be processed in slide group passes through step
After the completion of a- step h processing, return step a handles next lantern slide to be processed, institute's lantern slide to be handled in slide group
Step i is entered back into after the completion of processing, converts the lantern slide that step a- step h processing is had been subjected in slide group in step i
Picture format.
The backup file for also needing to delete the corresponding lantern slide to be processed after the step h, returns again to step a.
Further include step q before step a, receive slide file and associated sound, video to be processed from the background
File.
Further include step r between step q and step a, slide file is identified, if occurring not can recognize member
Element is then alarmed;If do not occur can not recognition element, enter step a.
The following processing step to sound, video file is also carried out while carrying out step a:
K, the file format for detecting lantern slide if pptx format, then enters step if ppt format, then enter step l
Rapid o;
L, the on-link mode (OLM) of sound, video is judged, if interior chain resource, then enter step m, if exterior chain resource, then enter
Step n;
M, sound, the video file being embedded in lantern slide are obtained, and sound, video file are uploaded into file server, into
Enter step p;
N, it obtains the title address of exterior chain resource and is matched according to title address with backstage upload sound, video file, into
Enter step p;
O, sound, video file information are obtained according to the xml document label in pptx format, enters step p;
P, sound, video data are stored, if exterior chain resource, access address is added, if interior chain resource, searching is needed
It is being jumped and it is processed at lantern slide position, and with triggering animated element corresponding on the lantern slide match store up
It deposits.
Beneficial effects of the present invention:
PPT animation of the present invention analysis, the processing method for extracting and being converted to picture format, at each lantern slide
Reason, first backs up, judges the type of animation effect, according to the principle of lantern slide animation effect, generally comprise start frame and end frame,
And load animation effect herein from the concept of start frame and end frame to understand, can be shape be moved to from a position it is another
The case where a different position, or from without to the case where appearance, equally, removing animation effect can be shape from a position
Mobile the case where being eventually returned to identical position is set, or the case where from having disappearing, according to the classification of both animation effects,
Animation is added under initial lantern slide, and is run according to animation effect, start frame forms a lantern slide, and end frame is as one
Lantern slide, and successively sort, animation effect is removed after the completion of the processing of this animation and recovery of shape is run to animation effect
Before, add next animation, the above steps are repeated, and for the followed by upper animation of next animation there is a situation where,
Judged, before running to animation effect removing and recovery of shape to animation effect, is directly added into next animation, such as
This analogizes, and can understand the animation effect on lantern slide, but can retain the front and back of animation in the form of several lantern slides
State, convenient for lantern slide is converted to picture format, file is transmitted convenient for user, is sent in each computer terminal by the design
It is run, while also facilitating storage.
Detailed description of the invention
A specific embodiment of the invention is described further with reference to the accompanying drawing.
Fig. 1 is PPT animation of the present invention analysis, the main flow chart for extracting and being converted to picture format.
Fig. 2 is the flow chart to sound, video resource processing.
Specific embodiment
As Figure 1-Figure 2, PPT animation of the present invention analysis, extract and be converted to the processing method of picture format, including with
Lower step:
A, whole animated elements of lantern slide to be processed and lantern slide to be processed are obtained;
B, lantern slide to be processed is copied into backup file;
C, judge that each animation effect is load animation effect or removes animation effect, if the animation effect is that load is dynamic
Draw effect, then delete the animation effect and with the associated shape of the animation effect, so that initial lantern slide is generated, if the animation
Effect is to remove animation effect, then generates initial M lantern slides, and M initial value is 1;
D, n-th animation is added on M lantern slides and forms next lantern slide, M=M+1, N initial value is 1;
E, it is analyzed using animation effect of the backup file to the n-th animation of M lantern slides to guide animation effect to transport
Row forms next lantern slide, M=M+1;
F, judge whether the N+1 animation carries out after n-th animation using backup file, if so, returning to step
Rapid d, if it is not, then entering step g;
G, it will be removed in M lantern slides about the animation effect of n-th animation and recovery of shape be to animation effect fortune
Before row, next lantern slide, M=M+1, N=N+1 are formed;
H, return step d, until having handled all animations on the lantern slide;
I, picture format is converted by lantern slide.
Wherein, whole animated elements herein refer to be added in this lantern slide with the associated shape of animation, animation
Effect etc. in order to be judged after system, while can also carry out a sequence to animation, in above-mentioned circulation successively
Animation is added, and backs up file one to be that active is out in order to restore when preventing data perturbation, two being to animation effect
Operation guides recovery.
Further, in step e, if the animation effect be load animation effect, by backup file with the animation effect
Associated shape is added in M lantern slides, removes the animation effect in M lantern slides and backup file.
In step e, if the animation effect is to remove animation effect, judge that the animation effect is to refund effect using backup file
Fruit still hides effect of fading out and then deletes animation effect if refunding effect;If hiding effect of fading out, then animation effect is deleted
Fruit and shape.
Further, remove animation effect include operation after hide, operation after click hide, refund effect, effect of fading out
Etc., and the processing hidden after running is to delete shape and animation effect;The processing clicked after operation is additional one " in click
When one step " type of fading out, " solute effect " and additional effect is moved to an immediately upper animation;It is dynamic to delete to refund effect
Effect is drawn, effect of fading out is to delete shape and animation.
Further include step j between step e and step f, detected using backup file and with readjusting in M parts of lantern slides
The animated element of N number of animation puts in order, after the completion of step e, since the animated element in each lantern slide is that have arrangement
Sequence, it will cause the disorder of sequence during deleting animation effect, it is therefore desirable to using backup file again to each dynamic
Element is drawn to be ranked up.
For several slide groups to be processed at slide group, the upper lantern slide to be processed in slide group passes through step
After the completion of a- step h processing, return step a handles next lantern slide to be processed, institute's lantern slide to be handled in slide group
Step i is entered back into after the completion of processing, converts the lantern slide that step a- step h processing is had been subjected in slide group in step i
Picture format.
Finally, backup file disorder in order to prevent, therefore, after step h also needs to delete the corresponding lantern slide to be processed
Backup file returns again to step a.
The design handles each lantern slide, first backs up, and judges the type of animation effect, according to lantern slide animation
The principle of effect generally comprises start frame and end frame, and loads animation effect herein and come from the concept of start frame and end frame
Understand, can be the case where shape is moved to another different position from a position, or from without to the case where appearance,
Equally, removing animation effect can be shape from position mobile the case where being eventually returned to identical position, or from having
To the case where disappearance, is classified according to both animation effects, animation is added under initial lantern slide, and transport according to animation effect
Row, start frame form a lantern slide, and end frame successively sorts as a lantern slide, after the completion of the processing of this animation
Before animation effect removing and recovery of shape are run to animation effect, next animation is added, the above steps are repeated, and is directed to
There is a situation where judged, without to animation effect removing and recovery of shape the followed by upper animation of next animation
To before animation effect operation, it is directly added into next animation, is so analogized, can understand the animation effect on lantern slide, still
The front and back state of animation can be retained, in the form of several lantern slides convenient for lantern slide is converted to picture format.
Further include step q before step a, receive slide file and associated sound, video to be processed from the background
File.
Slide file and associated sound, video file to be processed are sent backstage by user, is connect from the background
It receives, receives the process instruction of user's input, start to handle slide file, and it is unreal by multiple that slide file, which is,
The slide group that lamp piece is constituted.
And the program part of the design calls the Office ability base of windows system (when installation Office software, handle
Some open ability libraries are write in system, and other application can call directly) carry out elemental analysis.
Further include as a result, step r between step q and step a, slide file is identified, if occurring to know
Other element, then alarm;If do not occur can not recognition element, enter step a.
Further, it is walked as shown in Fig. 2, also carrying out the following processing to sound, video file while carrying out step a
It is rapid:
K, the file format for detecting lantern slide if pptx format, then enters step if ppt format, then enter step l
Rapid o;
L, the on-link mode (OLM) of sound, video is judged, if interior chain resource, then enter step m, if exterior chain resource, then enter
Step n;
M, sound, the video file being embedded in lantern slide are obtained, and sound, video file are uploaded into file server, into
Enter step p;
N, it obtains the title address of exterior chain resource and is matched according to title address with backstage upload sound, video file, into
Enter step p;
O, sound, video file information are obtained according to the xml document label in pptx format, enters step p;
P, sound, video data are stored, if exterior chain resource, access address is added, if interior chain resource, searching is needed
It is being jumped and it is processed at lantern slide position, and with triggering animated element corresponding on the lantern slide match store up
It deposits.
In step p, analyzes the data exchanged for and stored by specific structure, exterior chain resource, which directly provides, may have access to
Address, and interior chain resource needs to store the position of gap element, the slide location after identification region, the conversion that need to be jumped.
The design is further handled sound, video data, is guaranteed after lantern slide is converted to picture, in corresponding position
It sets and will do it label, when equally arriving specific picture, sound, video can be opened by link.
After PPT animation is converted picture by the design, convenient for user by file transmission, be sent in each computer terminal into
Row operation, while also facilitating storage.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to above embodiment, as long as with
Essentially identical means realize that the technical solution of the object of the invention belongs within protection scope of the present invention.