Coder Social home page Coder Social logo

pygifsicle's Introduction

pygifsicle

Travis CI build SonarCloud Quality SonarCloud Maintainability Codacy Maintainability Maintainability Pypi project Pypi total project downloads

Python package wrapping the gifsicle library for editing and optimizing gifs.

How do I install this package?

As usual, just download it using pip:

pip install pygifsicle

While running the installation, on MacOS the setup will automatically install gifsicle using Brew.

On Linux you will need to install gifsicle using apt-get as follows:

sudo apt-get install gifsicle

On Windows you will need to download and install the correct port of the library for your OS.

Tests Coverage

Since some software handling coverages sometime get slightly different results, here's three of them:

Coveralls Coverage SonarCloud Coverage Code Climate Coverate

Usage examples

The library is currently pretty plain: it offers a wrapper to gifsicle and a method to optimize gifs, wrapping the options for gifsicle.

Optimizing a gif

To optimize a gif, use the following:

from pygifsicle import optimize
optimize("path_to_my_gif.gif")

General wrapper

To run gifsicle from Python use the following:

from pygifsicle import gifsicle
gifsicle(
    sources=["list.gif", "of.gif", "gifs.gif"], # or a single_file.gif
    destination="destination.gif" # or just omit it and will use the first source provided.
    optimize=False, # Whetever to add the optimize flag of not
    colors=256, # Number of colors t use
    options=["--verbose"] # Options to use.
)

Learn more about the general wrapper by reading the function documentation.

Troubleshooting

One of the most common issues you can get, especially on windows, is that simply the gifsicle library is not available system wide. Do try to run gifsicle in your terminal to check if the library is properly installed.

Help and support

Wanna add another wrapper for easier usage? Do a pull request!

Did you find an error or weird behavior? Open an issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.