Skip to main content

The API for using COM (Component Object Model) objects interfaces of Photoshop.

Project description

photoshop_python_api

PyPI version

The API for using COM (Component Object Model) objects interfaces of Photoshop.

https://photoshop-python-api.readthedocs.io

logo

Has been tested and used Photoshop version:

- 2020
- cc2019
- cc2018
- cc2017
- cs6

Installing

You can install via pip.

pip install photoshop_python_api

or through clone from Github.

git clone https://github.com/loonghao/photoshop_python_api.git

Install package.

python setup.py install

Hello World

import photoshop as ps
app = ps.Application()
doc = app.documents.add()
new_doc = doc.artLayers.add()
text_color = ps.SolidColor()
text_color.rgb.green = 255
new_text_layer = new_doc
new_text_layer.kind = ps.LayerKind.TextLayer
new_text_layer.textItem.contents = 'Hello, World!'
new_text_layer.textItem.position = [160, 167]
new_text_layer.textItem.size = 40
new_text_layer.textItem.color = text_color
options = ps.JPEGSaveOptions(quality=5)
# # save to jpg
jpg = 'd:/hello_world.jpg'
doc.saveAs(jpg, options, asCopy=True)
app.doJavaScript(f'alert("save to jpg: {jpg}")')

demo

Useful links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photoshop_python_api-0.3.0.tar.gz (8.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

photoshop_python_api-0.3.0-py2.py3-none-any.whl (27.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file photoshop_python_api-0.3.0.tar.gz.

File metadata

  • Download URL: photoshop_python_api-0.3.0.tar.gz
  • Upload date:
  • Size: 8.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for photoshop_python_api-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ec63901b644119ab14f0a9016e90b8e63417900497d4aa81f05d427b04141b54
MD5 ece8d7ba0b48e920dbcb673ed664dbfc
BLAKE2b-256 374b23d37da41dcf237c1c03a2ba084008fcae9da958ff0f284e53eb494609fb

See more details on using hashes here.

File details

Details for the file photoshop_python_api-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: photoshop_python_api-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for photoshop_python_api-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3a27f0f8a78c279f9ec000aa48a9b7c06a2e655282cb3fa74be6489bea20379a
MD5 d2147d4a4698b7f5e0b72f6034a7ef20
BLAKE2b-256 348a602bc8335e27709a8f3bd1e02301373fc0b8e27aa0d617020353c8266a73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page