Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.86 KB

README.md

File metadata and controls

58 lines (40 loc) · 1.86 KB

Photoshop-Javascript

This is a javascript for photshop so you can have a safety margin in your projects

The script

The script allows you to have safety margins without having to constantly place or search for the right size.

Note

For the script to work you need to have developer mode activated within photoshop

How to use

  Files > script > Put the javascript file

How it works

The script will activate the reference guides and then place them there depending on the size of the image, if it is a feed it will be a certain size and if it is a story the other will be another certain size.

Part of the script

if (width == 1080 && height == 1080) {
    // FEED
  doc.guides.add(Direction.HORIZONTAL, 76.531);
  doc.guides.add(Direction.HORIZONTAL, 1003.469);
  doc.guides.add(Direction.VERTICAL, 76.531);
  doc.guides.add(Direction.VERTICAL, 540.0);
  doc.guides.add(Direction.VERTICAL, 1003.469);

  alert("Enabled Tabs.");
} 

Here is an example with tabs enabled

tabs-img

https://www.instagram.com/max_47___/p/C6oMZXSr32r/?img_index=1

You can use this on photopea too

Photopea Links
Photopea Javascript https://github.com/suchsoak/Photoshop-Javascript/blob/main/photopea.js
Photopea https://www.photopea.com
Documentation Links
Photoshop Javascript https://github.com/Adobe-CEP/CEP-Resources/blob/master/Documentation/Product%20specific%20Documentation/Photoshop%20Scripting/photoshop-javascript-ref-2020.pdf
Photoshop github https://github.com/Adobe-CEP/CEP-Resources
Developer Mode https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/developing/components/developer-mode

GNU General Public License v3.0