Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Image processing library for Python with animated GIFs support

Project description

Image processing library for Python with animated GIFs support - proxy wrapper around Pillow library with simple usable interface and access to each frame.

pypi version travis ci build status

Features

Attributes:

  • info
  • exif - dict with EXIF tags and GPS dict with GPS tags if presented
  • format
  • size
  • width
  • height
  • mode
  • mode_desc - image mode description
  • frame_count - frame count
  • animated - flag, which shows if image is animated
  • frames - frame list

Methods:

  • convert
  • crop
  • filter
  • paste
  • resize
  • rotate
  • thumbnail
  • transform
  • transpose
  • load - gets called when you access frames attribute for the first time or call any processing or save method, call this method explicitly to load all or limited number of frames (first n frames or random n frames without reordering)
  • save - save image
  • close - close image

Requirements

  • Python 3.5+
  • Pillow 4.1.1+

Setup

python-3.6 -m venv .env
source .env/bin/activate
pip install imgpy

Usage

from imgpy import Img


# Crop image
with Img(fp='test.gif') as im:
    im.crop(box=(10, 10, 110, 110))
    im.save(fp='crop.gif')

# Create thumbnail image
with Img(fp='test.gif') as im:
    im.thumbnail(size=(100, 100))
    im.save(fp='thumb.gif')

# Save 10 random GIF frames
with Img(fp='test.gif') as im:
    im.load(limit=10, first=False)
    im.save(fp='random.gif')

Tests

Run tests: py.test

Project details


Release history Release notifications

This version
History Node

1.1.0

History Node

1.0.0

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
imgpy-1.1.0-py3-none-any.whl (5.4 kB) Copy SHA256 hash SHA256 Wheel 3.6 May 14, 2017
imgpy-1.1.0.tar.gz (4.3 kB) Copy SHA256 hash SHA256 Source None May 14, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page