A simple image manipulation library aiming to make common image/photo
manipulation tasks easy. This library is still under development, API
may also change at any time.
Requires PIL/Pillow.
Example usage:
from da_vinci import Image
image = Image('lena.jpg')
image.flip('horizontal')
image.resize(width=10, height=10)
image.save()
image = Image('http://stamps.co.id/static/merchants/img/logo.png')
image.rotate(degrees=90)
image.set(format='jpg', quality=85)
image.save()
image.adjust(saturation=-100)
image.adjust(brightness=-75, contrast=50, sharpness=-20)
If you need more extensive manipulation, an escape hatch to PIL is also
available:
image = image.from_file('a.jpg')
pil_image = image.get_pil_image()
image.set_pil_image(pil_image)
Tests
To run tests:
python -m unittest tests
Changelog
Version 0.5.0
- Added support for converting transparent images to JPEG. Thanks @marsha97!
Version 0.4.0
- Support Pillow 10
- Preserve EXIF data when image is rotated
Version 0.3.0
- Added webp extension support
Version 0.2.2
- Added bmp extension support