https://github.com/yunruse/pxdlib
Pixelmator Pro image format (.pxd) library
https://github.com/yunruse/pxdlib
pixelmator raster-graphics vector-graphics-editor
Last synced: 5 months ago
JSON representation
Pixelmator Pro image format (.pxd) library
- Host: GitHub
- URL: https://github.com/yunruse/pxdlib
- Owner: yunruse
- License: mit
- Created: 2020-12-31T19:02:55.000Z (over 5 years ago)
- Default Branch: production
- Last Pushed: 2023-02-05T20:21:04.000Z (over 3 years ago)
- Last Synced: 2025-11-27T13:02:44.596Z (7 months ago)
- Topics: pixelmator, raster-graphics, vector-graphics-editor
- Language: Python
- Homepage:
- Size: 322 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pxdlib (Alpha 0.0.4)
A (reverse-engineered) library intended for deciphering and manipulating the `.pxd` files used by the image editor [Pixelmator Pro].
Grab Python 3.6 or above and `pip install pxdlib`!
Documentation exists for the [API], and a much longer set of documentation exists for the [reverse-engineering] of the `.pxd` format.
[Pixelmator Pro]: https://pixelmator.com/pro/
[API]: https://github.com/yunruse/pxdlib/blob/production/docs/api/readme.md
[reverse-engineering]: https://github.com/yunruse/pxdlib/blob/production/docs/pxd/readme.md
`pxdlib` can be used for a variety of purposes. For example, its first use case was to automagically manipulate coordinates, a little like:
```python
from csv import reader
from pxdlib import PXDFile
x0, y0 = 50, 100
COORDS = dict()
with open('data.csv') as f:
for name, x, y in reader(f):
COORDS[name] = x0 + float(x), y0 + float(y)
with PXDFile('graph.pxd') as pxd:
for l in pxd.all_layers():
if l.name in COORDS:
l.position = COORDS[l.name]
# The file is now saved and modified!
```
## Development
As `pxdlib` is available on PyPI, it will be updated in `production` only when a new version is available.
The reverse-engineering document, however, will be kept up-to-date in `production` as behaviour is confirmed.
## What can't pxdlib do?
The following are future goals:
- a much better file API, which doesn't just operate in-place,
- raster layers are accessible in a format which is compatible with a good raster-manipulating API;
- vector layers are fully modifiable;
- text layers can be modified, at least with the common formatting capabilities;
- all effects and filters are documented and available;
- layers can be created and destroyed;
- the above is all formally tested;
- actually being kept 100% up-to-date;
- backwards compatibility
Thankfully Pixelmator is pretty backwards-compatible, so the basic automation tools – toggling visibility, moving items around – should probably work forever. Maybe.
A changelog is available [here](https://github.com/yunruse/pxdlib/blob/production/docs/changelog.md).