CN108010109A - A kind of method and apparatus of export canvas animation files - Google Patents

A kind of method and apparatus of export canvas animation files Download PDF

Info

Publication number
CN108010109A
CN108010109A CN201711402700.3A CN201711402700A CN108010109A CN 108010109 A CN108010109 A CN 108010109A CN 201711402700 A CN201711402700 A CN 201711402700A CN 108010109 A CN108010109 A CN 108010109A
Authority
CN
China
Prior art keywords
film clip
files
bitmap
converted
picture element
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.)
Pending
Application number
CN201711402700.3A
Other languages
Chinese (zh)
Inventor
伍耀全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201711402700.3A priority Critical patent/CN108010109A/en
Publication of CN108010109A publication Critical patent/CN108010109A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The embodiment of the invention discloses a kind of method and apparatus of export canvas animation files, belong to animation design technique field.The described method includes:Obtain each film clip in target animation flash source files;Each picture element that each film clip in each film clip is included, is converted into bitmap;According to each film clip and the bitmap being converted into, canvas animation files are exported.Using the present invention, the occupancy of the CPU when loading canvas animation files can be reduced.

Description

A kind of method and apparatus of export canvas animation files
Technical field
The present invention relates to animation design technique field, the more particularly to a kind of method and dress of export canvas animation files Put.
Background technology
Horn of plenty web page contents, have usually contained canvas in current webpage (wherein canvas is a kind of animation types) Animation file, when terminal passes through displaying web page through browser, can play out the animation in webpage, wherein, in webpage Canvas animation files can be made of flash (animation) source file, wherein, flash source files can be swf (wherein, Swf is a kind of Animation File Format) source file of animation.Technical staff, can be by setting when making canvas animation files Software is counted, flash source files are fabricated to the canvas animation files that browser can play.
In the implementation of the present invention, inventor has found that the prior art has at least the following problems:
If flash source files only include film clip, the bitmap not comprising each picture element in each film clip Words, each picture element that each film clip includes is present in an encoded form in canvas animation files, canvas animations The coding information of each picture element is included in file.In such cases, it is necessary to elder generation during the browser execution canvas animation files Picture element after coding in canvas animation files is decoded, corresponding canvas animations could be played, it is often right Picture element after coding, which carries out decoding, needs more CPU (Central Processing Unit, central processing unit) moneys Source, so that, cause the occupancy of the CPU when loading canvas animation files larger.
The content of the invention
In order to solve the problems, such as that the occupancy of the CPU when loading canvas animation files present in correlation technique is larger, An embodiment of the present invention provides a kind of method and apparatus of export canvas animation files.The technical solution is as follows:
First aspect, there is provided a kind of method of export canvas animation files, the described method includes:
Obtain each film clip in target animation flash source files;
Each picture element that each film clip in each film clip is included, is converted into bitmap;
According to each film clip and the bitmap being converted into, canvas animation files are exported.
Optionally, the method further includes:
Obtain target swf animation files;
Decompiling processing is carried out to the target swf animation files, obtains the corresponding target of the target swf animation files Flash source files.
Optionally, each picture element that each film clip by each film clip includes, is converted into position Figure, including:
Plug-in unit is extracted by pre-set picture element, each film clip in each film clip is included Each picture element, is converted into bitmap.
Optionally, it is described that plug-in unit is extracted by pre-set picture element, by each shadow in each film clip Each picture element that piece editing includes, is converted into bitmap, including:
If the corresponding position of each picture element in each film clip is not included in the target flash source files Figure, then extract plug-in unit by pre-set picture element, each film clip in each film clip included each Picture element, is converted into bitmap.
Optionally, the canvas animation files include the script js files for not including the coding information for having each picture element With the picture obtained according to the bitmap being converted into.
Second aspect, there is provided a kind of device of export canvas animation files, described device include:
First acquisition module, for obtaining each film clip in target animation flash source files;
Modular converter, for each picture element for including each film clip in each film clip, is converted into Bitmap;
Export module, for according to each film clip and the bitmap being converted into, exporting canvas animation files.
Optionally, described device further includes:
Second acquisition module, for obtaining target swf animation files;
Decompiling module, for carrying out decompiling processing to the target swf animation files, obtains the target swf and moves Draw the corresponding target flash source files of file.
Optionally, the modular converter, is used for:
Plug-in unit is extracted by pre-set picture element, each film clip in each film clip is included Each picture element, is converted into bitmap.
Optionally, the modular converter, is used for:
If the corresponding position of each picture element in each film clip is not included in the target flash source files Figure, then extract plug-in unit by pre-set picture element, each film clip in each film clip included each Picture element, is converted into bitmap.
Optionally, the canvas animation files include the script js files for not including the coding information for having each picture element With the picture obtained according to the bitmap being converted into.
The beneficial effect that technical solution provided in an embodiment of the present invention is brought is:
In the embodiment of the present invention, each film clip in target animation flash source files is obtained;By in each film clip Each picture element that each film clip includes, is converted into bitmap;According to each film clip and the bitmap being converted into, export Canvas animation files.In this way, it is by each picture element in canvas animation files derived from each film clip and bitmap Exist in the form of picture, be no longer to exist in an encoded form, and then, browser is when running canvas animation files, nothing Decoding process need to be carried out again, it is thus possible to reduce the occupancy of the CPU when loading canvas animation files.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached 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 of ordinary skill in the art, without creative efforts, other can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is a kind of method flow diagram of export canvas animation files provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of export canvas animation files provided in an embodiment of the present invention;
Fig. 3 is a kind of apparatus structure schematic diagram of export canvas animation files provided in an embodiment of the present invention;
Fig. 4 is a kind of apparatus structure schematic diagram of export canvas animation files provided in an embodiment of the present invention;
Fig. 5 is a kind of structure diagram of terminal provided in an embodiment of the present invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
An embodiment of the present invention provides a kind of method of export canvas animation files, and the executive agent of this method is eventually End.Wherein, which can be the terminal with export canvas animation files, for example can be provided with corresponding application programs The terminal such as PC (personal computer, PC).Terminal can include the components such as processor, memory, screen. Processor can be CPU (Central Processing Unit, central processing unit) etc., can be used for export canvas and move Draw the relevant treatment of file.Memory can be RAM (Random Access Memory, random access memory), Flash (flash memory) etc., can be used for storing data generated in the data received, the data needed for processing procedure, processing procedure etc., Such as target flash source files.Screen is displayed for the information such as target flash source files.
Below in conjunction with embodiment, the process flow shown in Fig. 1 is described in detail, content can be as Under:
Step 101, each film clip in target flash source files is obtained.
Wherein, target flash source files can be the flash source files of editable canvas animation files to be exported.
In force, the application program of export canvas animation files can be installed, user can be by this in terminal Application triggers terminal exports canvas animation files.Specifically, when user wants to make canvas animation files, Ke Yitong The flash source files (can be described as target flash source files) that operation triggering terminal obtains canvas animation files to be exported are crossed, this When, terminal can obtain each film clip in target flash source files, wherein, target flash source files can be fla lattice The file of formula.
Optionally, target flash source files can be by target swf (shock wave flash, a kind of animation file Form) animation file obtains, correspondingly, terminal can also be handled as follows:Obtain target swf animation files;To target Swf animation files carry out decompiling processing, obtain the corresponding target flash source files of target swf animation files.
In force, target swf animation files can be previously stored with terminal, if user is wanted swf animations text Part is converted into canvas animation files, then can obtain target swf animation files by operating triggering terminal, and then, Ke Yigen According to default decompiling algorithm, decompiling processing is carried out to target swf animation files, it is corresponding to obtain target swf animation files Flash source files (can be described as target flash source files), wherein, target source file includes each film clip.On that is, State application program also to support swf animation files being converted into canvas animation files, that is, support the format conversion of animation file.
Step 102, each picture element each film clip in each film clip included, is converted into bitmap.
In force, after getting each film editor, for each film editor in each film editor, terminal can incite somebody to action Each picture element in every frame animation image in film editor, is converted into bitmap (bitmap).In this way, target flash sources The bitmap for the picture element that each film clip includes can be included in file, at this time, had in target flash source files corresponding Transformed bitmap resource.
Optionally, terminal can realize include each film clip in each film clip by corresponding plug-in unit Each picture element, is converted into the processing of bitmap, correspondingly, the processing procedure of step 102 can be as follows:Pass through pre-set figure Piece element extracts plug-in unit, and each picture element that each film clip in each film clip is included, is converted into bitmap.
In force, the program generation of picture element extraction plug-in unit (can be described as JSFL plug-in units) can be previously stored with terminal Code.After getting each film clip, terminal can be by pre-set JSFL plug-in units, automatically will be each in each film clip Each picture element that film clip includes, is converted into bitmap, i.e. terminal can be by running JSFL plug-in units, by each film clip Each picture element for including of each film clip, be converted into bitmap, wherein, by each film clip bag in each film clip Each picture element contained, being converted into bitmap is:Each picture element that every frame animation image in each film clip is included It is converted into bitmap.In this way, each picture element that every frame animation image includes can be converted into by terminal automatically by JSFL plug-in units Bitmap, cumbersome manual operation is carried out without user's (can be animation teacher), triggering terminal will be every in each film clip Each picture element that a film clip includes, is converted into bitmap, so that, while lifting exports efficiency, user can be reduced Study uses the learning cost of the application program.
Optionally, terminal can be held in the case where target flash source files do not include the corresponding bitmap of each picture element The processing of row step 102, correspondingly, the processing procedure of step 102 can be as follows:If do not include in target flash source files The corresponding bitmap of each picture element in each film clip, then extract plug-in unit, by each film by pre-set picture element Each picture element that each film clip in editing includes, is converted into bitmap.
In force, after getting target flash source files, terminal can also judge whether included in flash source files The corresponding bitmap of each picture element included in each film clip per frame animation image, if included in target flash source files The corresponding bitmap of each picture element that every frame animation image in each film clip includes, then terminal no longer carry out being converted into bitmap Processing, if including each film clip in target flash source files, and not comprising every frame animation image in each film clip Comprising the corresponding bitmap of each picture element, then terminal can be by pre-set JSFL plug-in units, will be per frame animation image bag Each picture element contained is converted into bitmap.
Step 103, according to each film clip and the bitmap being converted into, canvas animation files are exported.
In force, after each picture element that every frame animation image includes being converted into bitmap, terminal can be based on target Each film clip present in flash source files and the bitmap being converted into, export canvas animation files, as shown in Figure 2.
Optionally, canvas animation files include do not include have each picture element coding information js files and according to turn The picture that the bitmap changed into obtains.
In force, based on each film clip present in target flash source files and the bitmap being converted into, export During canvas animation files, the js files for not including the coding information for each picture element having in each film clip can be obtained (wherein, js can be a kind of file format), and the corresponding picture of bitmap can be obtained according to the bitmap being converted into.Also It is to say, after canvas animation files are exported, terminal just has the corresponding picture of bitmap of each picture element in each film clip, I.e. at this time, bitmap exists in the form of picture.Wherein, the form of picture is unlimited, for example can be png forms or be jpeg Form.Above-mentioned derived canvas animation files can be used in webpage making, and in such cases, user passes through application program system After obtaining canvas animation files, obtained canvas animation files can be transferred to the technical staff of webpage making, technology Personnel can make the webpage for including canvas animation files according to canvas animation files, i.e. browser is included in display During the webpage of canvas animation files, corresponding canvas animations can be played.Browser includes this programme in display and provides Canvas animation files webpage when, when running canvas animation files, can no longer carry out decoding process so that, can To reduce the occupancy of CPU and the occupancy of memory when loading canvas animation files, and then, it can prevent terminal from blocking Phenomenon, in addition to this it is possible to improve the loading velocity of canvas animations, lifts user experience.
In the embodiment of the present invention, each film clip in target animation flash source files is obtained;By in each film clip Each picture element that each film clip includes, is converted into bitmap;According to each film clip and the bitmap being converted into, export Canvas animation files.In this way, it is by each picture element in canvas animation files derived from each film clip and bitmap Exist in the form of picture, be no longer to exist in an encoded form, and then, browser is when running canvas animation files, nothing Decoding process need to be carried out again, it is thus possible to reduce the occupancy of the CPU when loading canvas animation files.
Based on identical technical concept, the embodiment of the present invention additionally provides a kind of device of export canvas animation files, As shown in figure 3, the device can be above-mentioned terminal, which includes:
First acquisition module 310, for obtaining each film clip in target animation flash source files;
Modular converter 320, for each picture element for including each film clip in each film clip, conversion Into bitmap;
Export module 330, for according to each film clip and the bitmap being converted into, exporting canvas animation files.
Optionally, as shown in figure 4, described device further includes:
Second acquisition module 340, for obtaining target swf animation files;
Decompiling module 350, for carrying out decompiling processing to the target swf animation files, obtains the target swf The corresponding target flash source files of animation file.
Optionally, the modular converter 320, is used for:
Plug-in unit is extracted by pre-set picture element, each film clip in each film clip is included Each picture element, is converted into bitmap.
Optionally, the modular converter 320, is used for:
If the corresponding position of each picture element in each film clip is not included in the target flash source files Figure, then extract plug-in unit by pre-set picture element, each film clip in each film clip included each Picture element, is converted into bitmap.
Optionally, the canvas animation files include the script js files for not including the coding information for having each picture element With the picture obtained according to the bitmap being converted into.
In the embodiment of the present invention, each film clip in target animation flash source files is obtained;By in each film clip Each picture element that each film clip includes, is converted into bitmap;According to each film clip and the bitmap being converted into, export Canvas animation files.In this way, it is by each picture element in canvas animation files derived from each film clip and bitmap Exist in the form of picture, be no longer to exist in an encoded form, and then, browser is when running canvas animation files, nothing Decoding process need to be carried out again, it is thus possible to reduce the occupancy of the CPU when loading canvas animation files.
It should be noted that:The device for the export canvas animation files that above-described embodiment provides is in export canvas animations , can be as needed and by above-mentioned work(only with the division progress of above-mentioned each function module for example, in practical application during file It can distribute and be completed by different function modules, i.e., the internal structure of terminal is divided into different function modules, more than completion The all or part of function of description.In addition, device and the export of the export canvas animation files that above-described embodiment provides The embodiment of the method for canvas animation files belongs to same design, its specific implementation process refers to embodiment of the method, here no longer Repeat.
Fig. 5 shows the structure diagram for the terminal 500 that an illustrative embodiment of the invention provides.The terminal 500 can be with It is:Smart mobile phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III, Dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) player, laptop or desktop computer.Terminal 500 be also possible to by Referred to as other titles such as user equipment, portable terminal, laptop terminal, terminal console.
In general, terminal 500 includes:Processor 501 and memory 502.
Processor 501 can include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 501 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 501 can also include primary processor and coprocessor, main Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state. In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for rendering and drawing for content to be shown needed for display screen.In some embodiments, processor 501 can also wrap AI (Artificial Intelligence, artificial intelligence) processor is included, which is used to handle related machine learning Calculate operation.
Memory 502 can include one or more computer-readable recording mediums, which can To be non-transient.Memory 502 may also include high-speed random access memory, and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In certain embodiments, the non-transient computer in memory 502 can Read storage medium to be used to store at least one instruction, which is used for performed by processor 501 to realize this Shen Please in embodiment of the method provide export canvas animation files method.
In certain embodiments, terminal 500 is also optional includes:Peripheral interface 503 and at least one ancillary equipment. It can be connected between processor 501, memory 502 and peripheral interface 503 by bus or signal wire.Each ancillary equipment It can be connected by bus, signal wire or circuit board with peripheral interface 503.Specifically, ancillary equipment includes:Radio circuit 504th, at least one of touch display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509.
Peripheral interface 503 can be used for I/O (Input/Output, input/output) is relevant at least one outer Peripheral equipment is connected to processor 501 and memory 502.In certain embodiments, processor 501, memory 502 and ancillary equipment Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer Any one or two in peripheral equipment interface 503 can realize on single chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 504 is used to receive and launch RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.Penetrate Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal It is changed to electromagnetic signal to be transmitted, alternatively, the electromagnetic signal received is converted to electric signal.Alternatively, radio circuit 504 wraps Include:Antenna system, RF transceivers, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 504 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but not limited to:WWW, Metropolitan Area Network (MAN), Intranet, each third generation mobile communication network (2G, 3G, 4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In certain embodiments, penetrate Frequency circuit 504 can also include the related circuits of NFC (Near Field Communication, wireless near field communication), this Application is not limited this.
Display screen 505 is used to show UI (User Interface, user interface).The UI can include figure, text, figure Mark, video and its their any combination.When display screen 505 is touch display screen, display screen 505 also there is collection to show The surface of screen 505 or the ability of the touch signal of surface.The touch signal can be inputted to processor as control signal 501 are handled.At this time, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft key and/or Soft keyboard.In certain embodiments, display screen 505 can be one, set the front panel of terminal 500;In other embodiments In, display screen 505 can be at least two, be separately positioned on the different surfaces of terminal 500 or in foldover design;In still other reality Apply in example, display screen 505 can be flexible display screen, be arranged on the curved surface of terminal 500 or on fold plane.Even, show Display screen 505 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can use LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Prepared etc. material.
CCD camera assembly 506 is used to gather image or video.Alternatively, CCD camera assembly 506 include front camera and Rear camera.In general, front camera is arranged on the front panel of terminal, rear camera is arranged on the back side of terminal.One In a little embodiments, rear camera at least two, is main camera, depth of field camera, wide-angle camera, focal length shooting respectively Head in any one, with realize main camera and the depth of field camera fusion realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting functions or other fusions are clapped Camera shooting function.In certain embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It can also be double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 507 can include microphone and loudspeaker.Microphone is used for the sound wave for gathering user and environment, and will Sound wave, which is converted to electric signal and inputs to processor 501, to be handled, or input to radio circuit 504 to realize voice communication. For stereo collection or the purpose of noise reduction, microphone can be multiple, be separately positioned on the different parts of terminal 500.Mike Wind can also be array microphone or omnidirectional's collection type microphone.Loudspeaker is then used to that processor 501 or radio circuit will to be come from 504 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker or piezoelectric ceramic loudspeaker.When When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, can also be by telecommunications Sound wave that the mankind do not hear number is converted to carry out the purposes such as ranging.In certain embodiments, voicefrequency circuit 507 can also include Earphone jack.
Positioning component 508 is used for the current geographic position of positioning terminal 500, to realize navigation or LBS (Location Based Service, location Based service).Positioning component 508 can be the GPS (Global based on the U.S. Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group Part.
Power supply 509 is used to be powered for the various components in terminal 500.Power supply 509 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can be wired charging electricity Pond or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is by wireless The battery of coil charges.The rechargeable battery can be also used for supporting fast charge technology.
In certain embodiments, terminal 500 has further included one or more sensors 510.The one or more sensors 510 include but not limited to:Acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, Optical sensor 515 and proximity sensor 516.
The acceleration that acceleration transducer 511 can be detected in three reference axis of the coordinate system established with terminal 500 is big It is small.For example acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 501 can With the acceleration of gravity signal gathered according to acceleration transducer 511, control touch display screen 505 is regarded with transverse views or longitudinal direction Figure carries out the display of user interface.Acceleration transducer 511 can be also used for game or the collection of the exercise data of user.
Gyro sensor 512 can be with the body direction of detection terminal 500 and rotational angle, and gyro sensor 512 can To cooperate with collection user to act the 3D of terminal 500 with acceleration transducer 511.Processor 501 is according to gyro sensor 512 The data of collection, it is possible to achieve following function:When action induction (for example changing UI according to the tilt operation of user), shooting Image stabilization, game control and inertial navigation.
Pressure sensor 513 can be arranged on the side frame of terminal 500 and/or the lower floor of touch display screen 505.Work as pressure When sensor 513 is arranged on the side frame of terminal 500, gripping signal of the user to terminal 500 can be detected, by processor 501 The gripping signal gathered according to pressure sensor 513 carries out right-hand man's identification or prompt operation.When pressure sensor 513 is arranged on During the lower floor of touch display screen 505, the pressure operation by processor 501 according to user to touch display screen 505, is realized to UI circle Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu At least one of control.
Fingerprint sensor 514 is used for the fingerprint for gathering user, is collected by processor 501 according to fingerprint sensor 514 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of the fingerprint recognition user collected.Identifying When the identity for going out user is trusted identity, the user is authorized to perform relevant sensitive operation, the sensitive operation bag by processor 501 Solution lock screen is included, encryption information is checked, downloads software, payment and change setting etc..Terminal can be set in fingerprint sensor 514 500 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 500, fingerprint sensor 514 can be with Integrated with physical button or manufacturer Logo.
Optical sensor 515 is used to gather ambient light intensity.In one embodiment, processor 501 can be according to optics The ambient light intensity that sensor 515 gathers, controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher When, heighten the display brightness of touch display screen 505;When ambient light intensity is relatively low, the display for turning down touch display screen 505 is bright Degree.In another embodiment, the ambient light intensity that processor 501 can also be gathered according to optical sensor 515, dynamic adjust The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor, are generally arranged at the front panel of terminal 500.Proximity sensor 516 The distance between front for gathering user and terminal 500.In one embodiment, when proximity sensor 516 detects use When the distance between family and the front of terminal 500 taper into, touch display screen 505 is controlled from bright screen state by processor 501 It is switched to breath screen state;When proximity sensor 516 detects that the distance between front of user and terminal 500 becomes larger, Touch display screen 505 is controlled to be switched to bright screen state from breath screen state by processor 501.
It will be understood by those skilled in the art that the restriction of the structure shown in Fig. 5 not structure paired terminal 500, can wrap Include than illustrating more or fewer components, either combine some components or arranged using different components.
In the embodiment of the present invention, each film clip in target animation flash source files is obtained;By in each film clip Each picture element that each film clip includes, is converted into bitmap;According to each film clip and the bitmap being converted into, export Canvas animation files.In this way, it is by each picture element in canvas animation files derived from each film clip and bitmap Exist in the form of picture, be no longer to exist in an encoded form, and then, browser is when running canvas animation files, nothing Decoding process need to be carried out again, it is thus possible to reduce the occupancy of the CPU when loading canvas animation files.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment To complete, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on, should all be included in the protection scope of the present invention.

Claims (10)

  1. A kind of 1. method of export canvas animation files, it is characterised in that the described method includes:
    Obtain each film clip in target animation flash source files;
    Each picture element that each film clip in each film clip is included, is converted into bitmap;
    According to each film clip and the bitmap being converted into, canvas animation files are exported.
  2. 2. according to the method described in claim 1, it is characterized in that, the method further includes:
    Obtain target swf animation files;
    Decompiling processing is carried out to the target swf animation files, obtains the corresponding target of the target swf animation files Flash source files.
  3. 3. according to the method described in claim 1, it is characterized in that, each film clip by each film clip Comprising each picture element, be converted into bitmap, including:
    Plug-in unit is extracted by pre-set picture element, each figure that each film clip in each film clip is included Piece element, is converted into bitmap.
  4. 4. according to the method described in claim 3, it is characterized in that, it is described by pre-set picture element extract plug-in unit, Each picture element that each film clip in each film clip is included, is converted into bitmap, including:
    If not including the corresponding bitmap of each picture element in each film clip in the target flash source files, Plug-in unit is extracted by pre-set picture element, each picture member that each film clip in each film clip is included Part, is converted into bitmap.
  5. 5. according to the method described in claim 1-4 any one, it is characterised in that the canvas animation files include not wrapping The script js files of coding information containing each picture element and the picture obtained according to the bitmap being converted into.
  6. 6. a kind of device of export canvas animation files, it is characterised in that described device includes:
    First acquisition module, for obtaining each film clip in target animation flash source files;
    Modular converter, for each picture element for including each film clip in each film clip, is converted into bitmap;
    Export module, for according to each film clip and the bitmap being converted into, exporting canvas animation files.
  7. 7. device according to claim 6, it is characterised in that described device further includes:
    Second acquisition module, for obtaining target swf animation files;
    Decompiling module, for carrying out decompiling processing to the target swf animation files, obtains the target swf animations text The corresponding target flash source files of part.
  8. 8. device according to claim 6, it is characterised in that the modular converter, is used for:
    Plug-in unit is extracted by pre-set picture element, each figure that each film clip in each film clip is included Piece element, is converted into bitmap.
  9. 9. device according to claim 8, it is characterised in that the modular converter, is used for:
    If not including the corresponding bitmap of each picture element in each film clip in the target flash source files, Plug-in unit is extracted by pre-set picture element, each picture member that each film clip in each film clip is included Part, is converted into bitmap.
  10. 10. according to the device described in claim 6-9 any one, it is characterised in that the canvas animation files are included not The picture for including the script js files of the coding information of each picture element and being obtained according to the bitmap being converted into.
CN201711402700.3A 2017-12-22 2017-12-22 A kind of method and apparatus of export canvas animation files Pending CN108010109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711402700.3A CN108010109A (en) 2017-12-22 2017-12-22 A kind of method and apparatus of export canvas animation files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711402700.3A CN108010109A (en) 2017-12-22 2017-12-22 A kind of method and apparatus of export canvas animation files

Publications (1)

Publication Number Publication Date
CN108010109A true CN108010109A (en) 2018-05-08

Family

ID=62060675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711402700.3A Pending CN108010109A (en) 2017-12-22 2017-12-22 A kind of method and apparatus of export canvas animation files

Country Status (1)

Country Link
CN (1) CN108010109A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120204094A1 (en) * 2011-02-08 2012-08-09 Ebay Inc. Application above-the-fold rendering measurements
US20130028514A1 (en) * 2011-07-28 2013-01-31 DeNA Co., Ltd. Non-transitory computer-readable storage medium containing html file, file conversion method, and non-transitory computer-readable storage medium containing file conversion program
US8423883B1 (en) * 2009-09-11 2013-04-16 Adobe Systems Incorporated Systems and methods of creating and editing electronic content including multiple types of graphics
CN103176986A (en) * 2011-12-20 2013-06-26 上海博泰悦臻电子设备制造有限公司 Method for converting flash animation data into hypertext markup language (HTML) 5 data
CN103826167A (en) * 2014-03-18 2014-05-28 上海景界信息科技有限公司 Micro-lecture playing engine and micro-lecture playing method
CN103838579A (en) * 2014-03-13 2014-06-04 上海景界信息科技有限公司 Micro-course recording method and engine adopting android system
CN104010204A (en) * 2013-02-27 2014-08-27 中国移动通信集团公司 Image information processing method and apparatus
CN104105000A (en) * 2013-04-12 2014-10-15 索尼公司 Companion device for audio-video display device server and method
CN104363502A (en) * 2014-10-28 2015-02-18 深圳创维-Rgb电子有限公司 Method and device for protecting OSD (on-screen display) pictures
CN105096367A (en) * 2014-04-30 2015-11-25 广州市动景计算机科技有限公司 Method and device of optimizing Canvas rendering performance
CN105513115A (en) * 2014-10-16 2016-04-20 腾讯科技(深圳)有限公司 Method and device for converting SWF into Canvas cartoon
CN105812813A (en) * 2016-03-21 2016-07-27 深圳宸睿科技有限公司 Teaching video compressing and playing methods, and compressing and playing devices
CN107145341A (en) * 2017-03-31 2017-09-08 武汉斗鱼网络科技有限公司 A kind of method and device that print log function is added in Flash

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8423883B1 (en) * 2009-09-11 2013-04-16 Adobe Systems Incorporated Systems and methods of creating and editing electronic content including multiple types of graphics
US20120204094A1 (en) * 2011-02-08 2012-08-09 Ebay Inc. Application above-the-fold rendering measurements
US20130028514A1 (en) * 2011-07-28 2013-01-31 DeNA Co., Ltd. Non-transitory computer-readable storage medium containing html file, file conversion method, and non-transitory computer-readable storage medium containing file conversion program
CN103176986A (en) * 2011-12-20 2013-06-26 上海博泰悦臻电子设备制造有限公司 Method for converting flash animation data into hypertext markup language (HTML) 5 data
CN104010204A (en) * 2013-02-27 2014-08-27 中国移动通信集团公司 Image information processing method and apparatus
CN104105000A (en) * 2013-04-12 2014-10-15 索尼公司 Companion device for audio-video display device server and method
CN103838579A (en) * 2014-03-13 2014-06-04 上海景界信息科技有限公司 Micro-course recording method and engine adopting android system
CN103826167A (en) * 2014-03-18 2014-05-28 上海景界信息科技有限公司 Micro-lecture playing engine and micro-lecture playing method
CN105096367A (en) * 2014-04-30 2015-11-25 广州市动景计算机科技有限公司 Method and device of optimizing Canvas rendering performance
CN105513115A (en) * 2014-10-16 2016-04-20 腾讯科技(深圳)有限公司 Method and device for converting SWF into Canvas cartoon
CN104363502A (en) * 2014-10-28 2015-02-18 深圳创维-Rgb电子有限公司 Method and device for protecting OSD (on-screen display) pictures
CN105812813A (en) * 2016-03-21 2016-07-27 深圳宸睿科技有限公司 Teaching video compressing and playing methods, and compressing and playing devices
CN107145341A (en) * 2017-03-31 2017-09-08 武汉斗鱼网络科技有限公司 A kind of method and device that print log function is added in Flash

Similar Documents

Publication Publication Date Title
CN109874312A (en) The method and apparatus of playing audio-fequency data
CN108401124A (en) The method and apparatus of video record
CN108449641A (en) Play method, apparatus, computer equipment and the storage medium of Media Stream
CN110502308A (en) Style sheet switching method, device, computer equipment and storage medium
CN110022489A (en) Video broadcasting method, device and storage medium
CN107888968A (en) Player method, device and the computer-readable storage medium of live video
CN108965757A (en) video recording method, device, terminal and storage medium
CN108965922A (en) Video cover generation method, device and storage medium
CN109359262A (en) Animation playing method, device, terminal and storage medium
CN109068008A (en) The tinkle of bells setting method, device, terminal and storage medium
CN108829488A (en) Generate Web can interaction page method, apparatus and storage medium
CN109346111A (en) Data processing method, device, terminal and storage medium
CN108132790A (en) Detect the method, apparatus and computer storage media of dead code
CN110121094A (en) Video is in step with display methods, device, equipment and the storage medium of template
CN110515688A (en) Page display method, device, terminal and storage medium
CN109192218A (en) The method and apparatus of audio processing
CN108900925A (en) The method and apparatus of live streaming template are set
CN109525900A (en) Method, apparatus, terminal and the storage medium of watermark are added in video
CN108831424A (en) Audio splicing method, apparatus and storage medium
CN110225390A (en) Method, apparatus, terminal and the computer readable storage medium of video preview
CN110288689A (en) The method and apparatus that electronic map is rendered
CN109102811A (en) Generation method, device and the storage medium of audio-frequency fingerprint
CN108509620A (en) Song recognition method and device, storage medium
CN108734662A (en) The method and apparatus for showing icon
CN107943484A (en) The method and apparatus for performing business function

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180508

RJ01 Rejection of invention patent application after publication