Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for rendering GIF file

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

Active Publication Date: 2014-05-21
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 15 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
  • Method and device for rendering GIF file
  • Method and device for rendering GIF file
  • Method and device for rendering GIF file

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 method for rendering a GIF (Graphic Interchange Format) file. The method comprises the steps of reading the GIF file by a stream reading method, decoding the read GIF file and obtaining decoded image frames, rendering the obtained image frames, determining whether the number of the obtained image frames reaches a predetermined number, and if so, finishing rendering, otherwise, returning and executing the step of reading the GIF file and obtaining the decoded image frames. The invention also discloses a device for rendering the GIF file. Compared with the prior art, the method and the device for rendering the GIF file is characterized by reading the GIF file by the stream reading method and rendering according to requirements, and as a result, occupation of resources is reduced, the efficiency of playing a GIF animation is improved, and the problem of occupation of excessive resources when the GIF file is read 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 Applications(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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products