Skip to main content

Yet Another Python wrapper for GraphicsMagick++

Project description

About

pgmagick is a yet another boost.python based wrapper for GraphicsMagick. (PythonMagick is dead?)

Install

$ pip install pgmagick

Require

GraphicsMagick and Boost.Python.

package install on Ubuntu:

$ apt-get install libgraphicsmagick++-dev
$ apt-get install libboost-python1.40-dev

package install on Fedora:

$ yum install GraphicsMagick-c++-devel
$ yum install boost-devel

Usage

scale example:

>>> from pgmagick import Image, FilterTypes
>>> im = Image('input.jpg')
>>> im.quality(100)
>>> im.filterType(FilterTypes.SincFilter)
>>> im.scale('100x100')
>>> im.sharpen(1.0)
>>> im.write('output.jpg')

composite example:

>>> from pgmagick import Image, CompositeOperator as co
>>> base = Image('base.png')
>>> layer = Image('layer_one.png')
>>> base.composite(layer, 100, 100, co.OverCompositeOp)
>>> im.write('output.png')

more API detail… read to Magick++ API for GraphicsMagick document.

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

pgmagick-0.2.1.tar.gz (24.6 kB view details)

Uploaded Source

File details

Details for the file pgmagick-0.2.1.tar.gz.

File metadata

  • Download URL: pgmagick-0.2.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pgmagick-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ffbc7b53e037eea25b6d608172a72074aa68d54412c59b27e6640d59c5feb43b
MD5 725caea88ba3399d952ddf147521e779
BLAKE2b-256 090329676c4018585e0145ff84caf419d349a1259d0d7d8b517ac765614d2d8c

See more details on using hashes here.

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