cmagick v.0.1.2

Hi guys!

I have just built a Python package that converts, and resizes images

Why I have build cmagick?

Before I have used Pillow and I had problems importing the “convert” module in AWS Lambda, then I have used Wand which was amazing because I have…


This content originally appeared on DEV Community and was authored by Aissa Laribi

Hi guys!

I have just built a Python package that converts, and resizes images

Why I have build cmagick?

Before I have used Pillow and I had problems importing the "convert" module in AWS Lambda, then I have used Wand which was amazing because I have managed to build a serverless image resizer on AWS Lambda, and then I wanted to build a serverless application that converts to WebP and I have struggled with Wand to link with libwebp in the Lambda runtime.

As a result, I have decided to do roughly the same thing as Wand but instead of binding C programming language with Python, I am binding the input of the commands on the Linux CLI and Python.

Image description

The main features of cmagick v.0.1.2

  • Converting images to the following formats (bmp,eps,gif,tiff,webp,wbmp,tga,png,jpg,jpeg,hdr,exr)
  • Resizing Images
  • Support path arguments

Simple usage

Examples:

To convert images

from cmagick import cmagick

cmagick.convert('website.jpg', 'website.webp')

To resize images

from cmagick import cmagick

cmagick.resize('website.jpg','100x100','website.jpg')

To convert and save in a defined directory

from cmagick import cmagick

cmagick.convert('website.jpg', '/Desktop/newname.webp')

Thank you for reading this small post🙏!

Connect with me on GitHub and pls put ✨star✨ for this package


This content originally appeared on DEV Community and was authored by Aissa Laribi


Print Share Comment Cite Upload Translate Updates
APA

Aissa Laribi | Sciencx (2022-04-12T00:04:52+00:00) cmagick v.0.1.2. Retrieved from https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/

MLA
" » cmagick v.0.1.2." Aissa Laribi | Sciencx - Tuesday April 12, 2022, https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/
HARVARD
Aissa Laribi | Sciencx Tuesday April 12, 2022 » cmagick v.0.1.2., viewed ,<https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/>
VANCOUVER
Aissa Laribi | Sciencx - » cmagick v.0.1.2. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/
CHICAGO
" » cmagick v.0.1.2." Aissa Laribi | Sciencx - Accessed . https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/
IEEE
" » cmagick v.0.1.2." Aissa Laribi | Sciencx [Online]. Available: https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/. [Accessed: ]
rf:citation
» cmagick v.0.1.2 | Aissa Laribi | Sciencx | https://www.scien.cx/2022/04/12/cmagick-v-0-1-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.