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()
# Opening an image from URL, rotating and change it's format
image = Image('http://stamps.co.id/static/merchants/img/logo.png')
image.rotate(degrees=90)
image.set(format='jpg', quality=85)
image.save() # Creates a file logo.jpg
# Manipulating saturation, brightness, contrast and sharpness
# Accepts values range from -100 (decrease) to 100 (increase)
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()
# Do whatever you need to do with the pil image
# And if you want to convert this back to a da_vinci 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
Metadata
Release files for da-vinci 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| da_vinci-0.5.0.tar.gz | 6.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| da_vinci-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / da_vinci-0.5.0.tar.gz
| Download URL | da_vinci-0.5.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4256566f9e4358413501330965cf5e875217fb03b518733281fb57401179563
|
|
BLAKE2b-256 checksum How to use checksums |
98bf2edb7c85beae9f1ea872aafd4c64a555986929566348c93ad247b78ef680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Release files / da_vinci-0.5.0-py3-none-any.whl
| Download URL | da_vinci-0.5.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7293cbf6d65000fc95d1dde3718f2d26a95e296a78a18d339aff3d38df35c328
|
|
BLAKE2b-256 checksum How to use checksums |
2179d051f53dd7433b724ba26f21a42e656af4d38385c69379f0d2679b4c39e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Security for da-vinci 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.