GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ui/da-vinci: A simple image manipulation library aiming to make common image/photo manipulation tasks easy.

BranchesTags
Open more actions menu

Latest commit

 

History

43 Commits
43 Commits

Folders and files

NameName
Last commit message
Last commit date
da_vinci
da_vinci
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
setup.py
setup.py
 
 

Repository files navigation

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

About

A simple image manipulation library aiming to make common image/photo manipulation tasks easy.

Resources

Readme
Activity

Stars

8 stars

Watchers

4 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.