In addition to some special vendors, most of the other Android device Boot animation package filenames are bootanimation.zip. You can view the system/media/path through ADB, if you do not normally call the system boot animation, that is, the Android Word. This Samsung is somewhat different, and its format is BOOTSAMSUNG.QMG. Today just talk about the production of bootanimation.zip with universality.
This is Samsung's:
First, ensure that the picture under the Bootanimation.zip compression package size and format are fully unified
Second, please write the specification of the configuration file Desc.txt
Desc.txt The actual meaning of each parameter, take the following case as an example:
480 854
P 1 0 part0
P 0 0 part1
1. The first two BITS 480 and 854 respectively indicate the width and height of the animation to be displayed. By default, the display has the same width and height, and if the setting is smaller than the size of the display, the animation will be centered and the perimeter will fill with a black box.
2. The third parameter 10 of the first line is the booking frame rate (fps) that defines the animation playback, and this frame rate fps refers to: animation played per second The number of frames. This number of frames is an ideal value, and does not necessarily represent the actual frame rate of the animation, assuming that the booking frame rate is fps_i, the time to book the t_i of each frame is t_i=1/fps_i.
the rules for the actual frame rate are:assuming that a frame is t_r from parsing to rendering, when t_r<=t_l is rendered , the thread of the animation willSleep (T_l-t_r) time, also say this frame last time is t_l;assuming a frame from parsing to rendering time is T_r, when t_r>t_l is rendered, the thread of the animation will open immediately after rendering the frame .start the next frame, it is said that the last time the frame is t_r. Therefore, the frame rate set in the Desc.txt does not represent the actual frame rate of the animation, the actual frame rate is the system bootperformance about, so not to say that the larger the frame rate in desc.txt, the better, the easier it is to appear when a frame takes a long time, it is easy to give users a frame of the experience, the current value of this FPS is generally set at about 13. of course, setting FPS to 13 is not to say that the system performance is lower, itself in the boot animation phase, the system entersbootup Android Stage, many processes need to be started, the main work of the system should be centralized with boot-up process, so do notIt is suggested that the picture of the animation is too complex, causing the system to turn performance worse.
3. The second and third rows are similar, and are generally used to set parameters for sequential play and infinite loop playback respectively.The first parameter p is the Google Default design, please keep the beginning of P. The second parameter, 1, indicates the number of times that this line is required to loop through the folder, and if 0 indicates an infinite loop, straightafter the system is ready, exit by passive. The third parameter, 0, indicates that each frame of the folder in this row corresponds to the next loop after rendering is completed., how long does the animation thread need to pause. the fourth parameter, Part0, represents the path of the folder that corresponds to the setting rule.
Note1: The default design is to put the sequential animation in a folder that defines the times that the folder needs to be looped A picture is placed inside an infinite loop folder to ensure that the animation does not receive an exit instruction, and the animation can be displayed all the time. .
Note2: Because each frame in a looping folder is stored in texture memory in a texture object and then upload to the GPU for rendering so that the next loop playback does not need to be re-parsed. If there are too many pictures in the animation package or if the size of the picture is large, the to occupy more memory, so in order to ensure the boot performance, boot animation is not recommended too complex.
Reprint Please specify source: Zhou Mushi's csdn blog Http://blog.csdn.net/zhoumushui
My github: Zhou Mushi's GitHub Https://github.com/zhoumushui
Production specification for Android boot animation package bootanimation