Python API for Photoshop.

Overview

logo

python version PyPI version Documentation Status Downloads Status Downloads License pypi format Chat on Discird Maintenance

All Contributors

Python API for Photoshop.

The example above was created with Photoshop Python API. Check it out at https://loonghao.github.io/photoshop-python-api/examples.

Has been tested and used Photoshop version:

Photoshop Version Supported
2021
2020
cc2019
cc2018
cc2017

Installing

You can install via pip.

pip install photoshop_python_api

Since it uses COM (Component Object Model) connect Photoshop, it can be used in any DCC software with a python interpreter.

Hello World

import photoshop.api 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

Photoshop Session

Use it as context.

from photoshop import Session


with Session(action="new_document") as ps:
    doc = ps.active_document
    text_color = ps.SolidColor()
    text_color.rgb.green = 255
    new_text_layer = doc.artLayers.add()
    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)
    jpg = 'd:/hello_world.jpg'
    doc.saveAs(jpg, options, asCopy=True)
    ps.app.doJavaScript(f'alert("save to jpg: {jpg}")')

Contributors

Thanks goes to these wonderful people (emoji key):


Hal

💻

voodraizer

🐛

brunosly

🐛

tubi

🐛

wjxiehaixin

🐛

罗马钟

🐛

clement

🐛

krevlinmen

🐛

Thomas

🐛

CaptainCsaba

🐛

Il Harper

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

how to get Photoshop program ID

Get-ChildItem "HKLM:\SOFTWARE\Classes" | 
  ?{ ($_.PSChildName -match "^[a-z]+\.[a-z]+(\.\d+)?$") -and ($_.GetSubKeyNames() -contains "CLSID") } | 
  ?{ $_.PSChildName -match "Photoshop.Application" } | ft PSChildName

get_program_id

How to get a list of COM objects from the registry

Useful links

Comments
  • Getting Windows error

    Getting Windows error "FileNotFoundError"

    Just installed the package and copied the exact usage example from the docs (active layer). Windows throws this WinError 2 error because apparently I have a 32 bits Python and it's looking for Photoshop as if it was also 32 bits (which is is not) according to this stack overflow issue.

    Using the suggested answer of adding the argument access=winreg.KEY_READ | winreg.KEY_WOW64_64KEY inside the function _get_install_version in _core.py worked for me.

    key = winreg.OpenKey(
            winreg.HKEY_LOCAL_MACHINE,
            self.REG_PATH,
            access=winreg.KEY_READ | winreg.KEY_WOW64_64KEY
    )
    

    Just in case: Using Windows 10, Python 3.7 and version 0.6.0 of this package.

    opened by tobimd 17
  • Cannot replace an image layer

    Cannot replace an image layer

    Describe the bug I am trying to replace an image layer in a photoshop file. For that purpose I am using this next code:

    To Reproduce This is my python code: with Session() as ps: replace_contents = ps.app.stringIDToTypeID("placedLayerReplaceContents") desc = ps.ActionDescriptor idnull = ps.app.charIDToTypeID("null") desc.putPath(idnull, "G:\BLEBLE\BLABLABLA\BLABLABLA\BLABLABL\BLABLA\2022\August\Images\09.jpeg") ps.app.executeAction(replace_contents, desc)

    Expected behavior It suppose to replace already existing image layer but instead of thar it show an error message and log.

    Screenshots Photoshop error message: image

    Terminal message: Traceback (most recent call last): File "g:\Blebleble\blablabla\blablabla\blablabla\Publicaciones\AUTOMATION\automate.py", line 43, in ps.app.executeAction(replace_contents, desc) File "C:\Users\bliblibli\AppData\Local\Programs\Python\Python310\lib\site-packages\photoshop\api\application.py", line 355, in executeAction return self.app.executeAction(event_id, descriptor, display_dialogs) File "C:\Users\bliblibli\AppData\Local\Programs\Python\Python310\lib\site-packages\comtypes\client\lazybind.py", line 182, in caller return self._comobj._invoke(descr.memid, descr.invkind, 0, *args) File "C:\Users\bliblibli\AppData\Local\Programs\Python\Python310\lib\site-packages\comtypes\automation.py", line 745, in _invoke self.__com_Invoke(memid, riid_null, lcid, invkind, _ctypes.COMError: (-2147213497, None, (None, None, None, 0, None))

    Desktop (please complete the following information):

    • OS: Windows 11 Home
    • Photoshop Version: Adobe Photoshop Version: 22.5.4 20211208.r.631 a0cb269 x64
    • Python Version: python-3.10

    Additional context This code actually worked once but suddenly it stopped working.

    opened by Edimo05 14
  • refactor(ActionDescriptor,ActionList,ActionReference): improve type communication

    refactor(ActionDescriptor,ActionList,ActionReference): improve type communication

    There is a problem in the current AM part of this api: When you use "get" functions, what you get is AM thing, but not an AM thing as well. It is an AM thing: you can use those "put" and "get" functions documented in Adobe's js scripting reference It is not an AM thing: It is just a COM bind object, using 'getType' will return number. So I made this modification to unify.

    Also, it seems that the functions written for the AM classes are not nessesary because it seems that COM bindings have already done that.

    opened by TsXor 10
  • _artLayer, remove() Issue

    _artLayer, remove() Issue

    For some reason I'm getting the following error when trying to use remove() on an artLayer object: raise NameError("Name %s not found" % name) NameError: Name remove not found

    Strangely enough, in _artLayer I duplicated the remove() method, renamed it to delete(), and called delete() and it works fine. It just can't seem to find remove().

    opened by MrTeferi 8
  • _ctypes.COMError when operating on document which is not in focus in Photoshop

    _ctypes.COMError when operating on document which is not in focus in Photoshop

    Working on a document object which is not in focus in the Photoshop application throws this error

    Traceback (most recent call last):
      File "/test.py", line 15, in <module>
        l.duplicate()
      File "\photoshop\api\_artlayer.py", line 463, in duplicate
        self.app.duplicate(relativeObject, insertionLocation)
      File "\comtypes\client\lazybind.py", line 182, in caller
        return self._comobj._invoke(descr.memid, descr.invkind, 0, *args)
      File "\comtypes\automation.py", line 729, in _invoke
        dp, var, None, argerr)
    _ctypes.COMError: (-2147213312, None, (None, None, None, 0, None))
    

    Steps to reproduce the behavior:

    #test.py
    import photoshop.api as ps
    
    app = ps.Application()
    
    for doc in app.documents:
        if len(doc.layers) > 1:
            print('Skipping', doc.name)
        else:
            for l in doc.layers:
                l.duplicate() # Throws error as above if doc is not in focus in photoshop app
    
    • OS: W10
    • Photoshop Version: Photoshop-2020
    • Python Version: 3.8
    opened by blunderedbishop 7
  • Typo in application.py, .batch tries to call app.bath

    Typo in application.py, .batch tries to call app.bath

        def batch(self, *args, **kwargs):
            """Runs the batch automation routine.
            Similar to the **File** > **Automate** > **Batch** command.
            """
            self.app.bath(*args, **kwargs)
    

    The batch function tries to call self.app.bath which doesn't exist.

    As I assume it neither wants to take a bath nor a shower I assume it's intended to call batch.

    opened by Alyxion 5
  • My code gives the error

    My code gives the error "Please check if you have Photoshop installed correctly."

    Hello, I'm trying to collect information from a user using telegram chat (pyTelegramBotAPI) so I can transfer this to photoshop inside the function in the future, but when I use the bot, the code gives the error "Please check if you have Photoshop installed correctly." Although if you run the same, but not through the bot everything will run and work fine.

    I tried - get a newer version of photoshop (CC2018 -> 2020), and also specify the path in the Windows environment variables. If you open photoshop using pyWin32 it works fine, but it's very unprofitable for me, I was going to use only pythonPhotoshopAPI.

    Here's the function

    def test_edit_text(info_from):
    try:
        psApp = ps.Application()
        psApp.Open(r"mypath\first.psd")
        doc = psApp.Application.ActiveDocument
        print(info_from['test'])
    
    
        text_from_user = info_from['test'] 
        layer1init = doc.ArtLayers["layer1"]
        text_new_layer1 = layer1init.TextItem
        text_new_layer1 .contents = f"{text_from_user .upper()}"
    
        options = ps.JPEGSaveOptions(quality=5)
        jpg = r'mypath\photo.jpg'
        doc.saveAs(jpg, options, True)
    except Exception as e:
        print(e)
    

    If you run the function like this, nothing works

    @bot.message_handler(content_types=['text'])
    def func(message):
        if(message.text == '/ph'):    #Here we send a request to the function via telegram chat
            user_info = {'test' : 'asdsaasd'}
            test_edit_text(user_info) 
    

    But if you run it like this, it works fine

    if __name__ == '__main__':
         user_info = {'test' : 'asdsaasd'}
         test_edit_text(user_info) `
    

    Why does the code suddenly stop seeing Photoshop? Is it possible that the two libraries are incompatible?

    opened by emogothyy 5
  • How to getByName on art layer?

    How to getByName on art layer?

    Is there a way to getByName on an art layer? I know for layer sets its: app.activeDocument.layerSets.getByName(name_here)

    But I'm getting name error on: app.activeDocument.artLayers.getByName(name_here)

    Even though I see in the api that artLayers does have a method "getByName"...

    opened by MrTeferi 5
  •  is there any  methods  to rename the existing  picture   layers

    is there any methods to rename the existing picture layers

    when I add picture as a layer,and the name of the layer will be the name of the picture

    I could not find any methods to rename the existing layers.

    and I use desc.putPath(ps.app.charIDToTypeID("null"),images["src"]) to add layer

    opened by brightendavid 5
  • I can't open the psd file, I get an error when I run it

    I can't open the psd file, I get an error when I run it

    import os
    
    from photoshop import Session
    
    
    def hide_all_layers(layers):
        for layer in layers:
            layer.visible = False
    
    
    def main():
        psd_file = 'demo1.psd'
        with Session(psd_file, action="open") as ps:
            doc = ps.active_document
            options = ps.PNGSaveOptions()
            layers = doc.artLayers
            for layer in layers:
                hide_all_layers(layers)
                layer.visible = True
                layer_path = os.path.join(doc.path, layer.name)
                print(layer_path)
                if not os.path.exists(layer_path):
                    os.makedirs(layer_path)
                image_path = os.path.join(layer_path, f"{layer.name}.png")
                doc.saveAs(image_path, options, True)
            ps.alert("Task done!")
            ps.echo(doc.activeLayer)
    
    
    if __name__ == "__main__":
        main()
    

    tips:

    _ctypes.COMError: (-2147220262, None, (None, None, None, 0, None))

    I get an error running directly from the library when I use the documentation: https://photoshop-python-api.readthedocs.io/en/0.15.1/examples.html#export-layers-as-png

    opened by zhenzi0322 5
  • TextLayer.kind and TextLayer.justification properties don't exist

    TextLayer.kind and TextLayer.justification properties don't exist

    I wrote this code:

    def writeLayer(text): txtLayer = doc.artLayers.add() txtLayer.kind = ps.LayerKind.TextLayer txtLayer.textItem.contents = text txtLayer.textItem.kind = ps.TextType.ParagraphText txtLayer.textItem.justification = ps.Justification.Center

    The problem is, the last 2 properties don't appear on Visual Code auto-complete, neither change anything in the new photoshop layer after executing the code. Also, the constants do appear on Visual Code, only the properties themselves that don't.

    I used the Photoshop JS scripting guide to figure out both of these properties: https://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref-2015.pdf#G4.368374

    opened by krevlinmen 5
  • the command

    the command "replace content" is currently not available

    I am using Adobe Photoshop CC2019. I am trying to replace an image in a layer. but i am always greeted with the error "the command replace content is currently not available"

    opened by cyberneticspk 1
  • module 'photoshop' has no attribute 'Application'

    module 'photoshop' has no attribute 'Application'

    When I run the example code it prints out AttributeError: module 'photoshop' has no attribute 'Application'

    Traceback (most recent call last):
      File "c:\Users\lidor\Documents\אישי\CryptoC\עדכון מחירים\start.py", line 22, in <module>  
        hello_world()
      File "c:\Users\lidor\Documents\אישי\CryptoC\עדכון מחירים\start.py", line 5, in hello_world
        app = ps.Application()
              ^^^^^^^^^^^^^^
    AttributeError: module 'photoshop' has no attribute 'Application'
    

    image

    • OS: Windows 10
    • Photoshop Version: Photoshop-2023
    • Python Version: python-3.11.2
    opened by lidorcohen12 1
  • Doesn't work with Photoshop 2022

    Doesn't work with Photoshop 2022

    I've been using this package with Photoshop 2020 with no problems. I've seen now that 2022 is marked as supported so I gave it a try, but it doesn't work.

    The same scripts that worked on 2020 run indefinitely on 2022 without doing anything. When I interrupt the script, this is the error that comes up:

    Traceback (most recent call last):
      File "env\lib\site-packages\photoshop\api\_core.py", line 36, in __init__
        self.app = self.instance_app(self.app_id)
      File "env\lib\site-packages\photoshop\api\_core.py", line 125, in instance_app     
        return CreateObject(self._program_name, dynamic=True)
      File "env\lib\site-packages\comtypes\client\__init__.py", line 227, in CreateObject
        clsid = comtypes.GUID.from_progid(progid)
      File "env\lib\site-packages\comtypes\GUID.py", line 85, in from_progid
        _CLSIDFromProgID(text_type(progid), byref(inst))
      File "_ctypes/callproc.c", line 922, in GetResult
    OSError: [WinError -2147221005] Invalid class string
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "env\lib\site-packages\photoshop\api\_core.py", line 135, in get_program_id
        self.instance_app(value.split(".")[0])
      File "env\lib\site-packages\photoshop\api\_core.py", line 125, in instance_app
        return CreateObject(self._program_name, dynamic=True)
      File "env\lib\site-packages\comtypes\client\__init__.py", line 238, in CreateObject
        obj = comtypes.CoCreateInstance(clsid, clsctx=clsctx, interface=interface)
      File "env\lib\site-packages\comtypes\__init__.py", line 1265, in CoCreateInstance
        _ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, byref(iid), byref(p))
      File "_ctypes/callproc.c", line 922, in GetResult
    OSError: [WinError -2146959355] Server execution failed
    
    Traceback (most recent call last):
     (***my script***)
      File "env\lib\site-packages\photoshop\api\_core.py", line 66, in __getattribute__
        return super().__getattribute__(item)
      File "env\lib\site-packages\photoshop\api\_document.py", line 64, in artLayers
        return ArtLayers(self.app.artLayers)
      File "env\lib\site-packages\photoshop\api\_artlayers.py", line 12, in __init__
        super().__init__(parent=parent)
      File "env\lib\site-packages\photoshop\api\_core.py", line 40, in __init__
        self.app = self.instance_app(self._get_program_id())
      File "env\lib\site-packages\photoshop\api\_core.py", line 141, in _get_program_id
        self.app_id = self.get_program_id().split(".")[0]
      File "env\lib\site-packages\photoshop\api\_core.py", line 135, in get_program_id
        self.instance_app(value.split(".")[0])
    KeyboardInterrupt
    
    opened by blunderedbishop 1
  • chore(deps): update dependency coverage to v7

    chore(deps): update dependency coverage to v7

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | coverage | ^6.3 -> ^7.0 | age | adoption | passing | confidence |


    Release Notes

    nedbat/coveragepy

    v7.0.3

    Compare Source

    • Fix: when using pytest-cov or pytest-xdist, or perhaps both, the combining step could fail with assert row is not None using 7.0.2. This was due to a race condition that has always been possible and is still possible. In 7.0.1 and before, the error was silently swallowed by the combining code. Now it will produce a message "Couldn't combine data file" and ignore the data file as it used to do before 7.0.2. Closes issue 1522_.

    .. _issue 1522:https://github.com/nedbat/coveragepy/issues/15222

    .. _changes_7-0-2:

    v7.0.2

    Compare Source

    • Fix: when using the [run] relative_files = True setting, a relative [paths] pattern was still being made absolute. This is now fixed, closing issue 1519_.

    • Fix: if Python doesn't provide tomllib, then TOML configuration files can only be read if coverage.py is installed with the [toml] extra. Coverage.py will raise an error if TOML support is not installed when it sees your settings are in a .toml file. But it didn't understand that [tools.coverage] was a valid section header, so the error wasn't reported if you used that header, and settings were silently ignored. This is now fixed, closing issue 1516_.

    • Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing issue 1515_.

    • Fix: the coverage lcov report did not properly implement the --fail-under=MIN option. This has been fixed.

    • Refactor: added many type annotations, including a number of refactorings. This should not affect outward behavior, but they were a bit invasive in some places, so keep your eyes peeled for oddities.

    • Refactor: removed the vestigial and long untested support for Jython and IronPython.

    .. _issue 1515:https://github.com/nedbat/coveragepy/issues/15155 .. _issue 1516https://github.com/nedbat/coveragepy/issues/151616 .. _issue 151https://github.com/nedbat/coveragepy/issues/1519519

    .. _changes_7-0-1:

    v7.0.1

    Compare Source

    • When checking if a file mapping resolved to a file that exists, we weren't considering files in .whl files. This is now fixed, closing issue 1511_.

    • File pattern rules were too strict, forbidding plus signs and curly braces in directory and file names. This is now fixed, closing issue 1513_.

    • Unusual Unicode or control characters in source files could prevent reporting. This is now fixed, closing issue 1512_.

    • The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing issue 1510_.

    .. _issue 1510:https://github.com/nedbat/coveragepy/issues/15100 .. _issue 1511https://github.com/nedbat/coveragepy/issues/151111 .. _issue 151https://github.com/nedbat/coveragepy/issues/1512512 .. _issue 15https://github.com/nedbat/coveragepy/issues/15131513

    .. _changes_7-0-0:

    v7.0.0

    Compare Source

    Nothing new beyond 7.0.0b1.

    .. _changes_7-0-0b1:


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Unable to adjust log level

    Unable to adjust log level

    Describe the bug There doesn't seem to be a way to easily adjust the log level (ie. INFO instead of DEBUG): templates py - MTG-Proxyshop - Visual Studio Code 11_28_2022 9_23_18 PM

    This ends up flooding the logs making it hard to see useful information.

    To Reproduce Steps to reproduce the behavior:

    1. Utilize the Photoshop API:
    from photoshop import api as ps
    
    app = ps.Application()
    app.openDialog()
    
    (do anything else with app)
    
    1. Look at application logs to see [DEBUG ] scattered throughout logs

    Expected behavior Ability to adjust log level to DEBUG, INFO, WARNING, ERROR, or CRITICAL.

    Screenshots See above

    Desktop (please complete the following information):

    • Windows version: Microsoft Windows 10 Pro (Version 10.0.19045 Build 19045)
    • Photoshop version: Photoshop 2023 (Version 24.0.1) - OS: [e.g. Windows10, Windows7]
    • Python version: 3.11.0

    Additional context N/A

    opened by davidianstyle 2
Releases(v0.20.1)
  • v0.20.1(Nov 28, 2022)

    What's Changed

    • docs: add Alyxion as a contributor for bug by @allcontributors in https://github.com/loonghao/photoshop-python-api/pull/208
    • refactor(action_descriptor): Fix type hints for doubles by @MrTeferi in https://github.com/loonghao/photoshop-python-api/pull/210

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.20.0...v0.20.1

    Source code(tar.gz)
    Source code(zip)
  • v0.20.0(Nov 26, 2022)

    What's Changed

    • feat: add a new option for create batch by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/207

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.7...v0.20.0

    Source code(tar.gz)
    Source code(zip)
  • v0.19.7(Nov 14, 2022)

    What's Changed

    • chore(examples): improve example for replace image by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/175
    • chore(deps): update dependency mkdocs-autolinks-plugin to ^0.6.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/165
    • chore(ci): update hound to ignore BLK100 by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/186
    • chore(deps): update dependency mkdocs-literate-nav to ^0.5.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/187
    • chore(deps): update dependency pytest-cov to v4 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/189
    • chore(deps): update dependency mkdocs-gen-files to ^0.4.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/180
    • refactor: update constants for support Photoshop 2022 by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/200
    • fix(deps): update dependency wheel to ^0.38.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/199
    • chore(deps): update dependency mkdocstrings-python to ^0.8.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/202

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.5...v0.19.7

    Source code(tar.gz)
    Source code(zip)
  • v0.19.6(Nov 6, 2022)

    What's Changed

    • chore(examples): improve example for replace image by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/175
    • chore(deps): update dependency mkdocs-autolinks-plugin to ^0.6.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/165
    • chore(ci): update hound to ignore BLK100 by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/186
    • chore(deps): update dependency mkdocs-literate-nav to ^0.5.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/187
    • chore(deps): update dependency pytest-cov to v4 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/189
    • chore(deps): update dependency mkdocs-gen-files to ^0.4.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/180
    • refactor: update constants for support Photoshop 2022 by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/200

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.5...v0.19.6

    Source code(tar.gz)
    Source code(zip)
  • v0.19.5(Jul 17, 2022)

    What's Changed

    • Fix do action by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/167

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.4...v0.19.5

    Source code(tar.gz)
    Source code(zip)
  • v0.19.4(Jul 10, 2022)

    What's Changed

    • docs: add be42day as a contributor for bug by @allcontributors in https://github.com/loonghao/photoshop-python-api/pull/157
    • chore(deps): update dependency mypy to ^0.961 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/136
    • chore(readme): add repobeats analytics by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/159
    • chore(readme): update example by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/160
    • fix: get document by document name from documents. by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/163

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.3...v0.19.4

    Source code(tar.gz)
    Source code(zip)
  • v0.19.3(Jun 17, 2022)

    What's Changed

    • docs: add damienchambe as a contributor for code by @allcontributors in https://github.com/loonghao/photoshop-python-api/pull/152
    • fix: fix import EPSSaveOptions by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/154

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.2...v0.19.3

    Source code(tar.gz)
    Source code(zip)
  • v0.19.2(Jun 14, 2022)

    What's Changed

    • chore(deps): update dependency mkdocstrings-python to ^0.7.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/149
    • chore(deps): update actions/setup-python action to v4 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/151
    • Add EPS format save action by @damienchambe in https://github.com/loonghao/photoshop-python-api/pull/145

    New Contributors

    • @damienchambe made their first contribution in https://github.com/loonghao/photoshop-python-api/pull/145

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.1...v0.19.2

    Source code(tar.gz)
    Source code(zip)
  • v0.19.1(May 29, 2022)

    What's Changed

    • Fix save png options by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/150

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.19.0...v0.19.1

    Source code(tar.gz)
    Source code(zip)
  • v0.19.0(May 20, 2022)

    What's Changed

    • docs: add MrTeferi as a contributor for code by @allcontributors in https://github.com/loonghao/photoshop-python-api/pull/143
    • feat(ArtLayer): added linkedLayers and opacity, fixed unlink by @MrTeferi in https://github.com/loonghao/photoshop-python-api/pull/146

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.18.1...v0.19.0

    Source code(tar.gz)
    Source code(zip)
  • v0.18.1(Apr 17, 2022)

    What's Changed

    • chore(docs): update docs ci by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/140
    • refactor(ActionList): Added ActionList to init and Session by @MrTeferi in https://github.com/loonghao/photoshop-python-api/pull/141

    New Contributors

    • @MrTeferi made their first contribution in https://github.com/loonghao/photoshop-python-api/pull/141

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.18.0...v0.18.1

    Source code(tar.gz)
    Source code(zip)
  • v0.18.0(Apr 4, 2022)

    What's Changed

    • 138 activedocumentexportdocumen by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/139

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.17.7...v0.18.0

    Source code(tar.gz)
    Source code(zip)
  • v0.17.7(Mar 20, 2022)

    What's Changed

    • chore(deps): update dependency coverage to v6 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/128
    • chore(deps): update dependency flake8 to v4 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/129
    • chore(deps): update dependency pytest to v7 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/130
    • chore(deps): update dependency mkdocs-pymdownx-material-extras to v2 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/132
    • fix(deps): update dependency wheel to ^0.37.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/133
    • chore(deps): update actions/checkout action to v3 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/134

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.17.6...v0.17.7

    Source code(tar.gz)
    Source code(zip)
  • v0.17.6(Mar 19, 2022)

    What's Changed

    • Configure Renovate by @renovate in https://github.com/loonghao/photoshop-python-api/pull/118
    • chore(deps): update codecov/codecov-action action to v1.5.2 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/119
    • chore(deps): update dependency mkdocs-autolinks-plugin to ^0.5.0 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/120
    • chore(deps): update dependency mypy to ^0.941 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/122
    • Add art layer instance by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/124
    • chore(deps): update actions/setup-python action to v3 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/126
    • chore(deps): update actions/checkout action to v3 by @renovate in https://github.com/loonghao/photoshop-python-api/pull/125
    • Improve type hits by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/127

    New Contributors

    • @renovate made their first contribution in https://github.com/loonghao/photoshop-python-api/pull/118

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/v0.17.5...v0.17.6

    Source code(tar.gz)
    Source code(zip)
  • v0.17.5(Mar 13, 2022)

  • v0.17.4(Mar 13, 2022)

    What's Changed

    • ci: update config by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/115
    • perf: add more docstrings by @loonghao in https://github.com/loonghao/photoshop-python-api/pull/116

    Full Changelog: https://github.com/loonghao/photoshop-python-api/compare/0.17.3...v0.17.4

    Source code(tar.gz)
    Source code(zip)
  • 0.15.1(Feb 3, 2021)

  • 0.15.0(Jan 10, 2021)

  • 0.14.0(Oct 22, 2020)

  • 0.13.0(Sep 23, 2020)

  • 0.12.1(Sep 13, 2020)

  • 0.12.0(May 10, 2020)

    • Refactor code struct and update API namespace, currently support two ways.
    import photoshop.api  as ps
    
    from photoshop import Session
    
    • Completed the update of all enumerated types.
    from photoshop.api import enumerations
    
        "LensType",
        "AdjustmentReference",
        "AnchorPosition",
        "AntiAlias",
        "AutoKernType",
        "BMPDepthType",
        "BatchDestinationType",
        "BitmapConversionType",
        "BitmapHalfToneType",
        "BitsPerChannelType",
        "BlendMode",
        "ByteOrderType",
        "CameraRAWSettingsType",
        "CameraRAWSize",
        "Case",
        "ChangeMode",
        "ChannelType",
        "ColorBlendMode",
        "ColorModel",
        "ColorPicker",
        "ColorProfileType",
        "ColorReductionType",
        "ColorSpaceType",
        "CopyrightedType",
        "CreateFields",
        "CropToType",
        "DCSType",
        "DepthMaource",
        "DescValueType",
        "DialogModes",
        "Direction",
        "DisplacementMapType",
        "DitherType",
        "DocumentFill",
        "DocumentMode",
        "EditLogItemsType",
        "ElementPlacement",
        "EliminateFields",
        "ExportType",
        "ExtensionType",
        "FileNamingType",
        "FontPreviewType",
        "ForcedColors",
        "FormatOptionsType",
        "GalleryConstrainType",
        "GalleryFontType",
        "GallerySecurityTextColorType",
        "GallerySecurityTextPositionType",
        "GallerySecurityTextRotateType",
        "GallerySecurityType",
        "GalleryThumbSizeType",
        "Geometry",
        "GridLineStyle",
        "GridSize",
        "GuideLineStyle",
        "IllustratorPathType",
        "Intent",
        "JavaScriptExecutionMode",
        "Justification",
        "Language",
        "LayerCompressionType",
        "LayerKind",
        "LayerType",
        "MagnificationType",
        "MatteType",
        "MeasurementRange",
        "MeasurementSource",
        "NewDocumentMode",
        "NoiseDistribution",
        "OffsetUndefinedAreas",
        "OpenDocumentMode",
        "OpenDocumentType",
        "OperatingSystem",
        "Orientation",
        "OtherPaintingCursors",
        "PDFCompatibilityType",
        "PDFEncodingType",
        "PDFResampleType",
        "PDFStandardType",
        "PICTBitsPerPixel",
        "PICTCompression",
        "PaintingCursors",
        "PaletteType",
        "PathKind",
        "PhotoCDColorSpace",
        "PhotoCDSize",
        "PicturePackageTextType",
        "PointKind",
        "PointType",
        "PolarConversionType",
        "PreviewType",
        "PurgeTarget",
        "QueryStateType",
        "RadialBlurMethod",
        "RadialBlurBest",
        "RasterizeType",
        "ReferenceFormType",
        "ResampleMethod",
        "ResetTarget",
        "RippleSize",
        "SaveBehavior",
        "SaveDocumentType",
        "SaveEncoding",
        "SaveLogItemsType",
        "SaveOptions",
        "SelectionType",
        "ShapeOperation",
        "SmartBlurMode",
        "SmartBlurQuality",
        "SourceSpaceType",
        "SpherizeMode",
        "StrikeThruType",
        "StrokeLocation",
        "TargaBitsPerPixels",
        "TextComposer",
        "TextType",
        "TextureType",
        "TiffEncodingType",
        "ToolType",
        "TransitionType",
        "TrimType",
        "TypeUnits",
        "UndefinedAreas",
        "UnderlineType",
        "Units",
        "Urgency",
        "Wartyle",
        "WaveType",
        "WhiteBalanceType",
        "ZigZagType",
    
    Source code(tar.gz)
    Source code(zip)
  • 0.11.0(May 7, 2020)

  • 0.9.0(Apr 8, 2020)

    • The update allows adds metadata to the document or read metadata from the document and image file.
    """Add metadata to current active document."""
    
    # Import built-in modules
    import os
    
    # Import local modules
    from photoshop import Session
    
    
    with Session(action="new_document") as ps:
        doc = ps.active_document
        doc.info.author = os.getenv("USERNAME")
        doc.info.provinceState = "Beijing"
        doc.info.title = "My Demo"
        # Print all metadata of current active document.
        ps.echo(doc.info)
    
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Apr 7, 2020)

  • 0.7.2(Mar 31, 2020)

  • 0.2.1(Feb 17, 2020)

Owner
Hal
Pipeline TD | Working in the VFX and Game Development industry.
Hal
Python async SDK for betsapi.com

Python async SDK for betsapi.com

1 Dec 21, 2021
Get your Pixiv token (for running upbit/pixivpy)

gppt: get-pixivpy-token Get your Pixiv token (for running upbit/pixivpy) Refine pixiv_auth.py + its fork Install ❭ pip install gppt Run Note: In advan

haruna 58 Jan 04, 2023
This repo contains a simple library for work with Eitaa messenger's api

Eitaa PyKit This repo contains a simple library for work with Eitaa messenger's api PyPI Page : https://pypi.org/project/Eitaa-PyKit Install via pip p

Bistcuite 20 Sep 16, 2022
Using GNU Radio and HackRF One to Receive, Analyze and Send ASK/OOK signals

play_with_ask NIS-8016 Lab A code: Recv.grc/py: Receive signals and match with ASK button using HackRF and GNU radio. I use AM demod block(can also in

Chen Anxue 1 Jul 04, 2022
Dicha herramienta esta creada con una api... esta api permite enviar un SMS cada 12 horas dependiendo del pais... Hay algunos paises y operadoras no están soportados.

SMSFree pkg install python3 pip install requests git clone https://github.com/Hidden-parker/SMSFree cd SMSFree python sms.py DISFRUTA... Dicha herrami

piter 2 Nov 14, 2021
Ap lokit lokit

🎵 FANDA PROJECT 🎵 HAI AKU FANDA! Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.8 or higher PyTgCalls MongoDB Get STRING_SESSION from below:

Fatur 2 Nov 18, 2021
A basic implementation of the Battlesnake API in Python

Getting started with Battlesnake and Python This is a basic implementation of the Battlesnake API in Python. It's a great starting point for anyone wa

Gaurav Batra 2 Dec 08, 2021
DankMemer-Farmer - Autofarm Self-Bot for Discord bot Named Dankmemer.

DankMemer-Farmer Autofarm Self-Bot for Discord bot Named Dankmemer. Warning We are not responsible if you got banned, since "self-bots" outside of the

Mole 16 Dec 14, 2022
A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan

Save Restricted Content Bot A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan. Variables API_ID API_HAS

Mahesh Chauhan 532 Jan 02, 2023
Desafio de projeto sobre Git/Github

Maçã ou Laranja? 🤔 Desafio Projeto Dio para Git/Github 🔶 Para esse primeiro repositório, decidir adicionar o primeiro algoritmo de inteligência arti

José Filipe 2 Oct 23, 2022
Automatic generation of crypto-arts based on image layers

NFT Generator Автоматическая генерация крипто-артов на основе слоев изображения. Установка pip3 install -r requirements.txt rm -rf result/* Как это ра

Zproger 31 Dec 29, 2022
Source code for "Efficient Training of BERT by Progressively Stacking"

Introduction This repository is the code to reproduce the result of Efficient Training of BERT by Progressively Stacking. The code is based on Fairseq

Gong Linyuan 101 Dec 02, 2022
YouTube-Discord-Bot - Discord Bot to Search YouTube

YouTube Bot Info YouTube Bot is a discord bot where you can search for anything

Riceblades11 10 Mar 05, 2022
Stinky ID - A stable pluggable Telegram userbot + Voice & Video Call music bot, based on Telethon

Ultroid - UserBot A stable pluggable Telegram userbot + Voice & Video Call music

Riyan.rz 1 Jan 03, 2022
Allows you to easily share bookmarks from Raindrop.io in Telegram chats.

Allows you to easily share bookmarks from Raindrop.io in Telegram chats. As well as save links/photos/longreads from Telegram right into Raindrop.io. Join us, we have a nice 'reader mode' :)

Oleh 36 Dec 19, 2022
Raid ToolBox (RTB) is a big toolkit of Spamming/Raiding/Token management tools for discord.

This code is very out of date and not very good, feel free to make it into something better. (we check the github page every 5 years to pulls your PRs

2 Oct 03, 2021
Python client for Midea dhumidifier

This is a library that allows communication with Midea dehumidifier appliances via the local area network. midea-beautiful-dehumidifier This library a

Nenad Bogojevic 42 Dec 22, 2022
Offline reverse geocoder in Python using sqlite3

rgeocode Offline reverse geocoder rgeocode accepts a geographic coordinate pair (latitude and longitude) and returns a list containing the name of: A

Venkat 7 Dec 01, 2021
A python script that can send notifications to your phone via SMS text

Discord SMS Notification A python script that help you send text message to your phone one of your desire discord channel have a new message. The proj

2 Apr 25, 2022
Asynchronous wrapper for wttr.in weather forecast.

aiopywttr Asynchronous wrapper for wttr.in weather forecast. Synchronous version here. Installation pip install aiopywttr Example This example prints

Almaz 4 Dec 24, 2022