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')
draw example:
>>> from pgmagick import Image, DrawableCircle, DrawableText, Geometry, Color >>> im = Image(Geometry(300, 300), Color("yellow")) >>> circle = DrawableCircle(100, 100, 20, 20) >>> im.draw(circle) >>> im.fontPointsize(65) >>> text = DrawableText(30, 250, "Hello pgmagick") >>> im.draw(text) >>> im.write('hoge.png')
more API detail… read to Magick++ API for GraphicsMagick document.
Project details
Release history Release notifications | RSS feed
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.3.tar.gz
(25.5 kB
view details)
File details
Details for the file pgmagick-0.2.3.tar.gz
.
File metadata
- Download URL: pgmagick-0.2.3.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 649cf117102eeb26392b61e83e3ac74bbe55fb46604aa82dd9bf48ed2b2d7e78 |
|
MD5 | 36f7c4ba916dd013fcf216c5c9d65147 |
|
BLAKE2b-256 | feb4fbd30a0013d6d1f4b2618ac1c1cfa53524bd47c16b1301f63c053e70ca84 |