Skip to main content

a python gifdec wrapper

Project description

pygifdec

a python wrapper for https://github.com/lecram/gifdec

Usage

import pygifdec

gif = pygifdec.open("cube.gif")

shape = (gif.width, gif.height)
print(shape)
pring(gif.size)

frame = bytearray(gif.size)
gif.render_frame(frame)
gif.get_frame()


from PIL import Image

for i in range(10):
    ret = gif.get_frame()
    if ret < 0:
        break
    gif.render_frame(frame)
    img = Image.frombuffer("RGB", shape, bytes(frame))
    img.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygifdec-0.0.2.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

pygifdec-0.0.2-cp310-cp310-macosx_10_9_universal2.whl (16.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page