Skip to main content

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

Project description

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!

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

pygifsicle-1.0.2.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file pygifsicle-1.0.2.tar.gz.

File metadata

  • Download URL: pygifsicle-1.0.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pygifsicle-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e33aacf8ec0f6231a8b3527484f3b50a77c7a7aeac26af53ade32e4d39d6eb50
MD5 993e338a39b11e67e2cbd6bff676c67c
BLAKE2b-256 09237adf797d3a65f568bb96e85b1a7ad046cc9b78be627df75927b83d6d6323

See more details on using hashes here.

Supported by

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