Method and device for converting swf into canvas animation

An animation and dynamic element technology, applied in the field of network applications, can solve the problems of consuming a long download time and low playback fluency, and achieve the effects of improving playback fluency, reducing data size, and simplifying processing.

Active Publication Date: 2020-06-16
TENCENT TECH (SHENZHEN) CO LTD
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Based on this, it is necessary to solve the problem that the traditional method of converting SWF to HTML5 animation needs to consume a long download time and cause the problem of low playback fluency, and provide a method of converting SWF to Canvas animation that can save download time and improve playback fluency Methods

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for converting swf into canvas animation
  • Method and device for converting swf into canvas animation
  • Method and device for converting swf into canvas animation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

[0025] figure 1 It is a flowchart of a method for converting SWF into Canvas animation in an embodiment. Such as figure 1 As shown, the method of converting SWF into Canvas animation includes the following steps:

[0026] Step 102: Analyze the SWF file, traverse the SWF file to obtain a component, which includes movie clips and graphics, and store the component definition in the component pool.

[0027] Specifically, the SWF file is composed of movie clips, graphics, and buttons. The uppermost component in a SWF is a movie clip, which is a container that can contain sub movie clips, sub graphic...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a method and a device for converting an SWF into a Canvas cartoon. The method comprises following steps of analyzing an SWF file, traversing the SWF file so as to obtain an element which comprises film editing and graphs, and defining and storing the element to an element pool; compressing the graphs and deriving compressed graph data; compressing the film editing and deriving frame operation instructions of the film editing; and calling and restoring the compressed graph data and the frame operation instructions of the film editing via an application function of a script runtime library to be a Canvas cartoon. In this way, size of the data is reduced; the compressed graph data and the frame operation instructions of the film editing are directly called via the application function of the script runtime library without conditional judgment, so computing time is reduced; and due to the small size of the data, loading time is saved and playing fluency is improved.

Description

Technical field [0001] The invention relates to network application technology, in particular to a method and device for converting SWF into Canvas animation. Background technique [0002] SWF (Shock Wave Flash) is a special format for animation design software Flash. It is an animation file format that supports vector and bitmap graphics. It is widely used in web design, animation production and other fields. SWF files are usually referred to as Flash files. . [0003] Canvas animation is an animation drawn on HTML5 (Hyper Text Mark-up Language) web pages using canvas elements. HTML5 is the core language of the World Wide Web, the fifth major revision of Hypertext Markup Language under the standard universal markup language. [0004] The traditional methods of converting SWF into HTML5 animation are Swiffy and Flashcc. Among them, swiffy analyzes the bytecode of the SWF file, analyzes the information of each frame in the animation, and outputs the information in the form of json ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06T13/80
Inventor 郑高强沈婧
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products