Photoshop Scripting with Python: Tutorial and Examples

  Рет қаралды 25,662

Martech with Me

Martech with Me

Күн бұрын

Пікірлер: 74
@GregContreras-gh6ny
@GregContreras-gh6ny Ай бұрын
We need more of this tutorials
@smoozz1e19
@smoozz1e19 4 жыл бұрын
So usefull. First good tutorial about work with psd which i saw
@martechwithme
@martechwithme 4 жыл бұрын
Really happy to hear that! Thank your for leaving a comment :)
@TheXao2
@TheXao2 3 жыл бұрын
Hi Yannis, thanks for the great video, but want more helpful information. For example: can I import images, work with layers (combine and arrange) and create strokes. And if possible, how to do it or where can you find documentation?
@JesFinkJensen
@JesFinkJensen 3 жыл бұрын
How would you insert images on specific layers? So for example, how would you replace the Fortnite image on the bottom layer with another image?
@Sam_A2
@Sam_A2 2 жыл бұрын
did u find ur answer anywhere? I've been looking for it
@ZZKJ396
@ZZKJ396 4 жыл бұрын
Nice, an interesting yet obscure subect.
@martechwithme
@martechwithme 4 жыл бұрын
Hey thanks for the comment! Glad to hear you found the subject of this video interesting :). I have many more scripts already written around the same kind of topic so I hope I will be able to record and edit those videos soon enough :)
@ZZKJ396
@ZZKJ396 4 жыл бұрын
Good man, I subbed after my post, just in case you made some more. Keep up the good work! :)
@geee7672
@geee7672 9 ай бұрын
....great eye opener. So in Photoshop we can remove a colour without changing the image quality and look. For instance... A printer / printshop doesn't wanna print Black in an image that's got CMYK build up so we remove the Black channel, distribute its values into CMY without changing the look, feel and quality of the image. Although the image stays as CMYK but with not detal on the black channel. Secondly, Adobe Illustrator Step and repeat. Without using the transform tool and drop-down, how would you automate a step and repeat using Python...
@steven7639
@steven7639 Жыл бұрын
I would love to see an equivalent tutorial for Mac OS X. As far as I can tell, most photoshop / psd tutorials require the win32com library and so are not compatible with mac os.
@dkxeno
@dkxeno 2 жыл бұрын
Amazing tutorial, thank you so much 🤝
@martechwithme
@martechwithme 2 жыл бұрын
Thanks for the kind words!
@timbacodes8021
@timbacodes8021 3 жыл бұрын
Very Nice, any more of these tutorials?
@zopzop8747
@zopzop8747 3 жыл бұрын
COLOR MATCH? Cheerz!
@rajantandan9723
@rajantandan9723 4 жыл бұрын
Why your channel have only one video. Upload more awesome videos like this 👍
@martechwithme
@martechwithme 4 жыл бұрын
Hey Rajan thanks for the kind words :) I know, I wanted to release at least one video a month to try KZbin a bit but my website is taking a lot of time :( I promise you new videos are coming soon though :D
@lwanso
@lwanso 3 жыл бұрын
Thank you! Do you know the attribute to play an already recorded action in the active document? This would be a game changer for me.
@smokinfiddler6640
@smokinfiddler6640 3 жыл бұрын
Yes! This would help me a lot too!
@lwanso
@lwanso 3 жыл бұрын
@@smokinfiddler6640 In the end I did everything in Javascript. Way easier to control everything in Photoshop. I did not even knew Javascript before then. Check out the ScriptingListener Plugin. It let's you record steps in Photoshop and gives you the code which you can then use and modify.
@ignasxv
@ignasxv 3 жыл бұрын
yooow, you so underrated
@martechwithme
@martechwithme 3 жыл бұрын
Thank you for your kind words! Really appreciate it!
@anonymousprince5102
@anonymousprince5102 3 жыл бұрын
How can we run pr-loaded action using python?
@davidcotto8955
@davidcotto8955 2 жыл бұрын
this is amazing, i have a few questions though. Are you able to run this python script via Photoshop > File > Scripts > Browse... and selecting a python script?
@guilhermecunha13
@guilhermecunha13 Жыл бұрын
Hi Yannis, thanks for the great video. How to set the position of each img inside the layer using X and Y parameters. Tks in advance
@timbacodes8021
@timbacodes8021 3 жыл бұрын
Can you do something around how to use this on a website? in the background? Is that possible?
@DE-signYourLife
@DE-signYourLife Жыл бұрын
How to simply make a layermask from the current layer? Is it possible?
@codestudio497
@codestudio497 2 жыл бұрын
hi what about images how can we replace them just like you did with the text layer , thank you
@mossadahmed8150
@mossadahmed8150 2 жыл бұрын
what if I want to place an image in a layer or maybe replace an existing image?!
@Sam_A2
@Sam_A2 2 жыл бұрын
What about images? Im trying to add an image over a specific layer, how would that be possible?
@devenjain7116
@devenjain7116 3 жыл бұрын
Hey, I made an application that takes user input using tkinter and then adds it to a PSD Template already created and renders it. (The latter part I made by watching your video) I am facing a problem. The User data I take takes input in the form of a paragraph and it has enter (blank lines) inside it that is read as: " " Photoshop does not recognize that character and hence It does not put a blank line there, instead, it puts an unknown character there and it makes the rendered end result look bad and I have to change it manually which defeats the purpose of automating this task...
@devenjain7116
@devenjain7116 3 жыл бұрын
Here is the Stack Overflow link which has screenshots of my problem as well, do consider helping! stackoverflow.com/q/67607868/15773448
@maleki2757
@maleki2757 Жыл бұрын
Hi is it possible to change part of text layer text color or font? with this python photoshop api?
@pasionporlamecanica.581
@pasionporlamecanica.581 2 жыл бұрын
I can´t open it, I´m new in this... any suggestion?
@MrNeo404
@MrNeo404 3 жыл бұрын
Can I change a specific picture? Meaning determining the name of the image element and changing it every time with another image from within a specific folder after each new save . + Can I select this new image and change its size as well? I don't want to change the size of the template as a whole . Only the image that I have added I want to resize before the final save process . If it is possible to do that I hope you can tell me the solution Best regards
@manoharnookala5341
@manoharnookala5341 Жыл бұрын
Hello, is it possible to align the images to create 360 degree view of product in python photoshop to automate the process
@daymaker_trading
@daymaker_trading 3 жыл бұрын
Thank you so so much!
@martechwithme
@martechwithme 3 жыл бұрын
Yay thank you for leaving a comment! Glad you liked it!
@HexDefender
@HexDefender 3 жыл бұрын
Hi . your tutorial is very nice an amazing Can you create apps for photo editing like photoshop using python
@sumitbamania8037
@sumitbamania8037 4 жыл бұрын
Awesome
@martechwithme
@martechwithme 4 жыл бұрын
Thanks so much for taking the time to leave a comment :) And glad to hear you found this useful! :)
@timbacodes8021
@timbacodes8021 3 жыл бұрын
Subscribed!
@jonoisedev
@jonoisedev 3 жыл бұрын
thank you for this!
@martechwithme
@martechwithme 3 жыл бұрын
You're so welcome! Thank you for leaving a comment, much appreciated :)
@robertrobo7611
@robertrobo7611 3 жыл бұрын
good tutorial
@devenjain7116
@devenjain7116 3 жыл бұрын
It is giving me an error saying that Photoshop.Application is not found or something... Error: Traceback (most recent call last): File "d:\Coding\Python Scripts\Dr Nikhil Prescription App\PS_test.py", line 3, in psApp.Open("Presc_Template.psd") File "", line 2, in Open pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Adobe Photoshop', 'Illegal argument - argument 1 - Expected a reference to an existing File/Folder', None, 0, -2147220262), None) Edit: It was my mistake and now the code works like a charm!
@martechwithme
@martechwithme 3 жыл бұрын
Hello there. The error code you've been given is that it can not find your PSD file because you are not giving it the correct path. As you can see in my video, I give the full path to my psApp.Open("full_path_here.psd"). Not just "file.psd".
@devenjain7116
@devenjain7116 3 жыл бұрын
How to save as PDF? Please help me
@Bronze-td8jq
@Bronze-td8jq 2 жыл бұрын
Hi, is it possible to do in Mac? Thank you!
@park_chang_hwi
@park_chang_hwi 3 жыл бұрын
In colaboratory, how can I install win32com module? !pip install pypi32com doesn't work
@martechwithme
@martechwithme 3 жыл бұрын
Hi! This tutorial only works on Windows with Photoshop installed. You need to use the Python interpreter that is in your Windows environment. Colaboratory is in the cloud and not directly connected to your local applications. You will be able to follow this tutorial if you install Anaconda in your Windows machine and launch Jupyter Notebook from there for instance.
@jocemarvosskovacs3384
@jocemarvosskovacs3384 3 жыл бұрын
Open Photoshop on mac, it's possible?
@yousefrofa
@yousefrofa 4 жыл бұрын
how to know all the photoshop functions in python??
@martechwithme
@martechwithme 4 жыл бұрын
Hi Yousef! Unfortunately, there is no documentation available at this moment. All of these discoveries are the fruit of manual testing using the VBS Script documentation that Adobe provides here : www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-vbs-ref.pdf ) But if you're interested in learning more, I try to update my article every time I find about new functions here: martechwithme.com/photoshop-scripting-with-python-on-windows/ Hope it helps :)
@Nabuuug
@Nabuuug 3 жыл бұрын
I'm really wondering your method to find all this stuff, how do you translate the Adobe reference with Python here since it's not made for Python?
@martechwithme
@martechwithme 3 жыл бұрын
Honestly? It has been a lot of experimentation. I found a very old article back then that showed how to change the content of the text laxer in Photoshop with Python and from there, I reverse-engineered the VBS documentation with the code sample I found online and managed to get the results depicted in this video. There are still many Photoshop actions and features I need to find how to use with Python though, but it was very rewarding for me to create such a video and to update the original article as i go along as I know that no one else is taking the time to experiment with it and give the findings away for free :)
@natezhurwi
@natezhurwi 2 жыл бұрын
I know this is 8 months later but here you can use this to play around with the objects and methods, a lot of very useful information - www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-vbs-ref.pdf Thank you for this video!
@MohammadHosseiniX
@MohammadHosseiniX 2 жыл бұрын
How can I read layer names and group names from a table automatically?
@MohammadHosseiniX
@MohammadHosseiniX 2 жыл бұрын
I want automatic create empty layers and empty groups in photoshop from a table. Photoshop version: 2021 Platform: Win 10 *Regards*
@damdam9055
@damdam9055 3 жыл бұрын
Does anyone know how to center and resize an image?
@shehikes5888
@shehikes5888 3 жыл бұрын
what should i do if it says "No module named 'win32com'" as in error comment
@shehikes5888
@shehikes5888 3 жыл бұрын
even i had installed pip list pywin32. still getting that error
@martechwithme
@martechwithme 3 жыл бұрын
Hey hey, thank you for reaching out! Just to make sure, you are using Windows to follow this tutorial right? At the moment, my instructions only work for Windows and not on Mac OS or Linux :/ If yes, then you can try these two lines in the command line: python -m pip install pypiwin32 python -m pip install pywin32 Also make sure that the modules are actually installed in the environment that you are using! Hope that helps! Let me know how it went!
@shehikes5888
@shehikes5888 3 жыл бұрын
@@martechwithme Hey , Thank for helping me!!! It works fine now. please continue your next video and article.
@smoozz1e19
@smoozz1e19 4 жыл бұрын
What version of Photoshop did you use?
@martechwithme
@martechwithme 4 жыл бұрын
The version used in this tutorial was CC 2014 but I also tried this with CC 2018 and it worked as well!
@smoozz1e19
@smoozz1e19 4 жыл бұрын
@@martechwithme thx
@jed_01
@jed_01 Жыл бұрын
Hello Martech can you Write me a python script that will 1. Stack all the pictures in each sub folder into one Photoshop document file and after sacking each sub folder , it will automatically create a new folder into the sub folder with the name 'psd' and each stack photoshop document file will be save (using Photoshop document file format) into the newly created file sub folder and the stack file will be close automatically after it might have save , and the next sub folder will do the same thing ,that will be done serially from folder one to the last folder, The folder names will take this format 1. New folder (1), New folder (2), till maybe New folder (20), sometimes to New folder (25), remember to use a very simple GUI, the sizes of the Photoshop document file I want to use is 10 x 20 inches, 12 x 24 inches , 8x 20 inches and 12x 20 inches , remember to let the user of this app chose the size before the automation start. Remember to display the message ' finish 'when the automation is done with the last sub folder . Also remember I want the stack images to fit into the size that of my documents .
@martechwithme
@martechwithme Жыл бұрын
Hello, you can reach out to me through my consulting form if you're interested in exploring how I can help you with your project: martechwithme.com/consulting/
@devenjain7116
@devenjain7116 3 жыл бұрын
THIS DOES NOT WORK WHATSOEVER!! Edit: I am sorry, it was my mistake while writing the code. It worked like a charm for me after I fixed my mistake I had to change the line called: Photoshop.Application to something else and then it worked! Thank You so much @Martech with Me
@martechwithme
@martechwithme 3 жыл бұрын
I just answered your previous comment. It seems to me like the error is on your side. I went through this guide again myself and everything is still working as explained in both Photoshop CC 2014 and 2018. I can't guarantee for the more recent versions but unless you're on a different architecture like M1 from Apple, that should even work for newer versions.
@devenjain7116
@devenjain7116 3 жыл бұрын
I was using CC 2019. It worked now, thank you, I have updated my earlier comment! I really appreciate it :)
Python Automation with PyAutoGUI | Full Course With Projects!
36:11
Code of the Future
Рет қаралды 173 М.
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 6 МЛН
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
Automating Image Workflows with Photoshop APIs by Raymond Camden
45:54
Certified Fresh Events
Рет қаралды 1,2 М.
Top 18 Most Useful Python Modules
10:50
Tech With Tim
Рет қаралды 930 М.
Showing a Craigslist scammer who's boss using Python
5:27
Engineer Man
Рет қаралды 6 МЛН
Start Automating Your Life Using Python! (File Management with Python Tutorial)
13:07
Draw with OpenCV - No more Photoshop! Graphic Design with Python!
14:23
Python Simplified
Рет қаралды 34 М.
Photoshop Live - Street Retouch Prank
2:25
AdobeNordic
Рет қаралды 35 МЛН
Adobe is horrible. So I tried the alternative
25:30
Bog
Рет қаралды 1 МЛН
Real Life Automation With Python - Let's not use Photoshop this time
12:01
Jakob Wolitzki | Custom Automations for Sellers
Рет қаралды 12 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38