https://github.com/aissa-laribi/cmagick
ImageMagick Utility Converting & Resizing Images for Python
https://github.com/aissa-laribi/cmagick
image-converter image-editor image-resizer imagemagick
Last synced: 6 months ago
JSON representation
ImageMagick Utility Converting & Resizing Images for Python
- Host: GitHub
- URL: https://github.com/aissa-laribi/cmagick
- Owner: aissa-laribi
- License: mit
- Created: 2022-04-08T21:21:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-08T15:36:18.000Z (almost 3 years ago)
- Last Synced: 2025-03-26T19:03:06.307Z (6 months ago)
- Topics: image-converter, image-editor, image-resizer, imagemagick
- Language: Python
- Homepage:
- Size: 12.6 MB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmagick

[](https://github.com/aissa-laribi/cmagick/actions/workflows/python-app.yml)
Cmagick is a subprocess-based simple ImageMagick interaction for Python, supporting Python 3.6+ and Linux distributions.
The functionalities of ImageMagick implemented in cmagick are:
-Converting images to the following formats (bmp,eps,gif,tiff,webp,wbmp,tga,png,jpg,jpeg,hdr,exr)
-Resizing pictures with a declarative size
-Support path arguments
## Usage
Examples:
To convert images
```
from cmagick import cmagickcmagick.convert('website.jpg', 'website.webp')
```
To resize images
```
from cmagick import cmagickcmagick.resize('website.jpg','100x100','website.jpg')
```
To convert and save in a defined directory
```
from cmagick import cmagickcmagick.convert('website.jpg', '/Desktop/newname.webp')
```To check the current formats available
```
from cmagick import cmagickprint(cmagick.list_formats())
```## Prerequisites
Python 3.6+
imagemagick for apt Debian/Ubuntu
ImageMagick for yum RPM## Installation
You can install the package from PyPI:
```
pip install cmagick
```
You can install the package the GitHub repository:
```
$ git clone git://github.com/aissa-laribi/cmagick.git
$ cd cmagick/
$ python3 setup.py install --user
```
## To Uninstall
```
$ pip uninstall cmagick
```