hhatto / Pgmagick
Licence: mit
pgmagick is a yet another boost.python based wrapper for GraphicsMagick/ImageMagick.
Stars: ✭ 100
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Pgmagick
Php Legofy
Transform your images as if they were made out of LEGO bricks.
Stars: ✭ 161 (+61%)
Mutual labels: image-processing, imagemagick
Node S3 Uploader
Flexible and efficient resize, rename, and upload images to Amazon S3 disk storage. Uses the official AWS Node SDK for transfer, and ImageMagick for image processing. Support for multiple image versions targets.
Stars: ✭ 237 (+137%)
Mutual labels: image-processing, imagemagick
Jekyll Gallery Generator
A Jekyll plugin that generates photo galleries from directories full of images.
Stars: ✭ 315 (+215%)
Mutual labels: image-processing, imagemagick
Image processing
High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick
Stars: ✭ 600 (+500%)
Mutual labels: image-processing, imagemagick
Nuxt Image Loader Module
An image loader module for nuxt.js that allows you to configure image style derivatives.
Stars: ✭ 135 (+35%)
Mutual labels: image-processing, imagemagick
Skeptick
Better ImageMagick for Ruby
Stars: ✭ 326 (+226%)
Mutual labels: image-processing, imagemagick
Spacechop
HTTP service for high-level image processing with first-class Docker support.
Stars: ✭ 133 (+33%)
Mutual labels: image-processing, imagemagick
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+5994%)
Mutual labels: image-processing, imagemagick
Wasm Imagemagick
Webassembly compilation of https://github.com/ImageMagick/ImageMagick & samples
Stars: ✭ 442 (+342%)
Mutual labels: image-processing, imagemagick
Govips
A lightning fast image processing and resizing library for Go
Stars: ✭ 442 (+342%)
Mutual labels: image-processing, imagemagick
Sv Images
Image manipulation library with an HTTP based API.
Stars: ✭ 7 (-93%)
Mutual labels: image-processing, imagemagick
Flyimg
Dockerized PHP7 application runs as a Microservice to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick. Includes face detection, cropping, face blurring, image rotation and many other options. Abstract storage based on FlySystem in order to store images on any provider (local, AWS S3...).
Stars: ✭ 762 (+662%)
Mutual labels: image-processing, imagemagick
Traffic Sign Detection
Traffic signs detection and classification in real time
Stars: ✭ 96 (-4%)
Mutual labels: image-processing
Dped
Software and pre-trained models for automatic photo quality enhancement using Deep Convolutional Networks
Stars: ✭ 1,315 (+1215%)
Mutual labels: image-processing
Pyautolens
PyAutoLens: Open Source Strong Gravitational Lensing
Stars: ✭ 90 (-10%)
Mutual labels: image-processing
Glide Transformations
An Android transformation library providing a variety of image transformations for Glide.
Stars: ✭ 9,540 (+9440%)
Mutual labels: image-processing
Photostructure For Servers
PhotoStructure for Servers
Stars: ✭ 98 (-2%)
Mutual labels: image-processing
About
.. image:: https://img.shields.io/pypi/v/pgmagick.svg :target: https://pypi.org/project/pgmagick/ :alt: PyPI Version
.. image:: https://github.com/hhatto/pgmagick/workflows/Python%20package/badge.svg :target: https://github.com/hhatto/pgmagick/actions :alt: Build status
pgmagick is a yet another boost.python based wrapper for GraphicsMagick_ .
.. _GraphicsMagick: http://www.graphicsmagick.org/
Installation
install to::
$ pip install pgmagick
Requirements
Python3.5++ (or Python2.7), GraphicsMagick and Boost.Python.
package install on Debian Buster::
$ apt-get install g++ libgraphicsmagick++1-dev libboost-python-dev
package install on Ubuntu(test on Ubuntu10.04+)::
### Ubuntu11.10+ ###
$ apt-get install python-pgmagick
### Ubuntu10.04+ ###
$ apt-get install libgraphicsmagick++1-dev
$ apt-get install libboost-python1.40-dev
package install on Fedora::
$ yum install GraphicsMagick-c++-devel
$ yum install boost-devel
GraphicsMagick from source package::
$ ./configure --enable-shared=yes
$ make && make install
MacOSX
via homebrew-cask(homebrew-pgmagick) with Python3
use `homebrew-pgmagick`_ ::
$ brew tap hhatto/pgmagick
$ brew install pgmagick
.. _`homebrew-pgmagick`: https://github.com/hhatto/homebrew-pgmagick
via homebrew-cask(homebrew-pgmagick) with Python3
via homebrew and pip with Python3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on MacOSX (10.13.5~10.15.x)::
$ brew install python
$ brew install graphicsmagick
$ brew install boost-python3
$ pip install pgmagick
Windows
-------
Now, not official support.
However, *unofficial* binary packages exists.
- http://www.lfd.uci.edu/~gohlke/pythonlibs/#pgmagick
ImageMagick support
-------------------
pgmagick is supported to ImageMagick library. (*version:0.4+*)
package install on Ubuntu(test on Ubuntu10.04+)::
$ apt-get install libmagick++-dev
show library name and version::
>>> from pgmagick import gminfo
>>> gminfo.library
'GraphicsMagick' # or 'ImageMagick'
>>> gminfo.version
'1.3.x'
>>>
Usage
=====
scale example::
>>> from pgmagick import Image
>>> im = Image('input.jpg')
>>> im.quality(100)
>>> im.scale('100x100')
>>> im.sharpen(1.0)
>>> im.write('output.jpg')
resize example::
>>> from pgmagick import Image
>>> im = Image('input.jpg')
>>> im.filterType(FilterTypes.SincFilter)
>>> im.resize('100x100')
>>> 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')
blob access::
>>> from pgmagick import Image, Blob, Geometry
>>> blob = Blob(open('filename.jpg').read())
>>> blob.update(open('filename2.jpg').read())
>>> img = Image(blob, Geometry(600, 480))
>>> img.scale('300x200')
>>> img.write('out.jpg')
create animated-GIF::
from pgmagick import Image, ImageList, Geometry, Color
imgs = ImageList()
for color in ('red', 'blue', 'green', 'black', 'yellow'):
imgs.append(Image(Geometry(200, 200), Color(color)))
imgs.animationDelayImages(100)
imgs.scaleImages(Geometry(100, 100))
imgs.writeImages('output.gif')
more API detail... read to `Magick++ API for GraphicsMagick`_ document.
.. _`Magick++ API for GraphicsMagick`: http://www.graphicsmagick.org/Magick++/
Python APIs(*NOTICE!! this api is alpha version!!*)::
>>> from pgmagick.api import Image
>>> img = Image((300, 300), "gradient:#ffffff-#000000")
>>> img.scale(0.8)
>>> img.write('out.png')
Links
=====
* PyPI_
* `Project Page`_
* `Project Page (Old)`_
.. _PyPI: http://pypi.python.org/pypi/pgmagick/
.. _`Project Page`: https://github.com/hhatto/pgmagick/
.. _`Project Page (Old)`: https://bitbucket.org/hhatto/pgmagick/
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].