Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethereon/pydye
A python graphics library for OS X, powered by Apple's Quartz graphics layer.
https://github.com/ethereon/pydye
Last synced: 7 days ago
JSON representation
A python graphics library for OS X, powered by Apple's Quartz graphics layer.
- Host: GitHub
- URL: https://github.com/ethereon/pydye
- Owner: ethereon
- Created: 2012-10-20T12:13:59.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-27T03:37:14.000Z (over 11 years ago)
- Last Synced: 2024-11-08T21:12:28.567Z (2 months ago)
- Language: Python
- Size: 115 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PyDye
======
**PyDye** is a python graphics library for OS X, powered by Apple's Quartz graphics layer.Features
---------
- Read and write common image formats (png, jpg, tif, bmp, etc)
- Bezier paths
- Gradients
- Affine transforms
- Pixel-level access for raster graphics
- "Pythonic" APIWhy?
-----
### If your target platform is Mac OS XPyDye "just works". It has no third-party dependencies. It uses OS X's native graphics layer, so you get high quality and performance out of the box
Here are a couple of short examples of what it looks like:
#### Drawing a circle
```python
with Image(800, 600) as img:
Oval(center=(400, 300), radius=100).fill(color=RGB(1, 0, 0))
img.save('~/Pictures/Circle.png')
```#### Vignetting an image
```python
overlay = Gradient(start=RGBA(0, 0, 0, 0), stop=RGBA(0, 0, 0, 0.9))
with Image(path='~/Pictures/blueSky.jpg') as img:
overlay.draw_radial_in_rect(img.bounds())
img.preview()
```### If your target platform is not Mac OS X
See *Why Not*.
Why Not?
---------
- It's not cross-platform - it only works on Mac OS X.
- It's still in alpha.Requirements
-------------
- Mac OS X 10.7 or newer#### Dependencies already bundled with OS X
- Python 2.7
- PyObjC