Hello everyone.
Please help me write a script for Photoshop.
It has a built-in script for straightening and cropping, but it crops the object tightly and opens it in a new file.
Help me write a script that makes from picture 1 to picture 2. The background is always black. There should be fields around the picture from the background in the size of 8px. So that I can run the script and it will do it with the current picture and save everything.
Pic1
Pic2
Please help me with the script
-
- Posts: 8
- Joined: Tue Nov 14, 2023 12:11 pm
Re: Please help me with the script
The result below comes from the provided script using your example jpg as the source.
The result may vary depending on your setup (it was tested on an older version of PS) and any actual content on the white papers.
There where some white parts in the upper left corner edge of the image that had to be compensated for. The script should ignore smaller white areas, but try to keep the entire background mostly black for consistency.
The result may vary depending on your setup (it was tested on an older version of PS) and any actual content on the white papers.
There where some white parts in the upper left corner edge of the image that had to be compensated for. The script should ignore smaller white areas, but try to keep the entire background mostly black for consistency.
-
- Posts: 3
- Joined: Fri Dec 13, 2024 1:18 pm
Re: Please help me with the script
Hello. Thank you very much. Please tell me on which version of PS this script works? I couldn't run it on 2022 and 2019.dpaintArexx wrote: ↑Tue Dec 17, 2024 10:25 pm The result below comes from the provided script using your example jpg as the source.
The result may vary depending on your setup (it was tested on an older version of PS) and any actual content on the white papers.
There where some white parts in the upper left corner edge of the image that had to be compensated for. The script should ignore smaller white areas, but try to keep the entire background mostly black for consistency.
scriptTest copy.jpg
cropBlack8px.zip
-
- Posts: 8
- Joined: Tue Nov 14, 2023 12:11 pm
Re: Please help me with the script
Hi,
I tried in a more recent version Photoshop 2024 on macOs. And it ran as expected.
What is your process for running the script?
You will need to have an active image open, then:
File -> Scripts -> Browse... <Select the script file>
I tried in a more recent version Photoshop 2024 on macOs. And it ran as expected.
What is your process for running the script?
You will need to have an active image open, then:
File -> Scripts -> Browse... <Select the script file>
-
- Posts: 3
- Joined: Fri Dec 13, 2024 1:18 pm
Re: Please help me with the script
I apologize. I tried it on English PS and everything works. But sometimes it doesn't make an 8px indent on the right.dpaintArexx wrote: ↑Mon Dec 30, 2024 2:10 pm Hi,
I tried in a more recent version Photoshop 2024 on macOs. And it ran as expected.
What is your process for running the script?
You will need to have an active image open, then:
File -> Scripts -> Browse... <Select the script file>
-
- Posts: 8
- Joined: Tue Nov 14, 2023 12:11 pm
Re: Please help me with the script
Interesting that it only worked in English version. That is good to know.
Anyway, when the script fails.. What do the source images look like?
Anyway, when the script fails.. What do the source images look like?