gif file rendering method and device

A file and file pointer technology, applied in the computer field, can solve problems such as multi-resources and difficulty in playing GIF animations, and achieve the effect of solving excessive resource occupation, reducing resource occupation, and improving efficiency

Active Publication Date: 2017-08-25
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the above method must read the entire GIF, which takes up more resources. In addition, the operating system or hardware of the smart phone is insufficient, making it very difficult to play GIF animation on the smart phone.

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
  • gif file rendering method and device
  • gif file rendering method and device
  • gif file rendering method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] refer to figure 1 , figure 1 It is a flow chart of a GIF file rendering method provided by Embodiment 1 of the present invention. In this embodiment, the GIF file rendering method includes:

[0022] Step S11: read the GIF file by means of stream reading.

[0023] Step S12: Decoding the read GIF file and obtaining the decoded frame picture.

[0024] Step S13: rendering the acquired frame picture.

[0025] Step S14: Judging whether the number of acquired frame pictures reaches a predetermined number, if so, end rendering; otherwise, return to and execute the step of decoding the read GIF file and obtaining decoded frame pictures.

[0026] Compared with the prior art, the GIF file rendering method provided by this embodiment adopts the streaming reading method to read the GIF file, and renders it on demand, which reduces the occupation of resources, improves the efficiency of playing GIF animation, and solves the problem of The problem of excessive resource occupation...

Embodiment 2

[0028] refer to figure 2 , figure 2 It is a flow chart of a GIF file rendering method provided by Embodiment 2 of the present invention. In this embodiment, the GIF file rendering method includes:

[0029] Step S21: Read the GIF file by means of stream reading.

[0030] Step S22: Decoding the read GIF file and obtaining the decoded frame picture.

[0031] Step S23: rendering the acquired frame picture.

[0032] Step S24: Judging whether the number of acquired frame pictures reaches a predetermined number, if so, ending rendering; otherwise, returning to and executing the step of decoding the read GIF file and obtaining decoded frame pictures.

[0033] Different from Embodiment 1, in this embodiment, step S21 includes:

[0034] Step S211: Obtain the file path of the GIF file.

[0035] Step S212: Move the file pointer.

[0036] Step S213: Determine whether the file pointer has reached the target position, if so, read the GIF file; otherwise, return and execute the step ...

Embodiment 3

[0039] refer to image 3 , image 3 It is a flow chart of a GIF file rendering method provided by Embodiment 3 of the present invention. In this embodiment, the GIF file rendering method includes:

[0040] Step S31: read the GIF file by means of stream reading.

[0041] Step S32: Decoding the read GIF file and obtaining the decoded frame picture.

[0042] Step S33: rendering the acquired frame picture.

[0043] Step S34: Judging whether the number of acquired frame pictures reaches a predetermined number, if so, ending rendering; otherwise, returning to and executing the step of decoding the read GIF file and obtaining decoded frame pictures.

[0044] Different from Embodiment 1, in this embodiment, step S32 includes:

[0045] Step S321: Set a specific flag and the binary content of the last bit of the specific flag, where the binary content of the last bit of the specific flag is used to indicate the length to be moved by the file pointer. The specific flag bit is, for ...

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 discloses a GIF file rendering method, comprising: reading the GIF file by adopting a streaming reading method; decoding the read GIF file and obtaining a decoded frame picture; rendering the obtained frame picture; judging the obtained Whether the number of frame pictures reaches the predetermined number, if yes, then end the rendering; otherwise, return and execute the step of decoding the read GIF file and obtaining the decoded frame pictures. The invention also discloses a GIF file rendering device. Compared with the prior art, the GIF file rendering method and device provided by the present invention read GIF files using a streaming reading method and render them on demand, which reduces resource occupation and improves the efficiency of playing GIF animations. The problem of excessive resource occupation caused by reading GIF files in the prior art is solved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for rendering a GIF file. Background technique [0002] With the improvement of people's requirements for the application of mobile terminal equipment, the capabilities of mobile terminal equipment have become more and more powerful in today's rapid development of the IT manufacturing industry. Smartphones have become the most mainstream mobile terminal equipment due to their powerful functions. Compared with ordinary mobile phones, smart phones have an independent operating system, and users can install application programs provided by third-party service providers such as application software, games, and emails by themselves, and continuously expand the functions of mobile phones through such programs. [0003] The application of smart phone operating systems has been involved in many fields, including browsers, various business software, etc., which bring...

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/00
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