/Resize-Elements-PS-toolset

PS CS6 plugin to resize various images in a batch.

Primary LanguageJavaScript

Resize Elements - PS toolset

๐Ÿš€๐Ÿš€๐Ÿš€

This is a small plugin to automate repetitive and boring tasks connected with UI elements
Important! Tested and created for Photshop CS6 64bit Version: 13.0 on Windows 10

How the program works

Add canvas Set canvas Set canvas by biggest edges
add canvas set canvas Set canvas by biggest edges
2^n canvas Trim canvas Add resize image Set image size
2^n canvas trim canvas resize image set image size

Getting Started ๐Ÿ’ก

  1. You choose opened files in PS or source folder with files to process
  2. Later you decide if you want to save them in an original directory or in the chosen destination folder
  3. In the end, you process files by (Add canvas, Set canvas, Add resize image, Set image size, Set canvas by biggest edges, 2^n canvas, Trim canvas, or Add resize image) with user's input values

List of changed files are written in ChangedFilesList.log, if value in Preferences.ini in "CHANGEDFILESLIST.LOG" in key WRITE LOG is =ON
You can change ON/OFF value by clicking the button Settings, then button ChangedFilesList.log" Log

Toolset consist of:

  • Add canvas (add a canvas by relative value to already existing size)

  • Set canvas (set a canvas by absolute value, each selected file will have the same size)

  • Set canvas by biggest edges (each image has extreme edges sizes in a selected set)

  • 2^n canvas (add a canvas for both sides by the nearest value of a power of 2)

  • Trim canvas (crop image to non-transparent pixels)

  • Add resize image (resize image by added value)

  • Set image size (resize image by set value)

  • Settings (Filter source folder files by PNG, hide dialog "Do you want to close all opened files" enable writing changed names of files in "ChangedFilesList.log")

AppData are in: ~Documents/UI-Photoshop-toolSet:

  • ChangedFilesList.log

  • Preferences.ini in which you can change values by Settings buttons or by rewriting them in a file:

    • "Filter files by PNG" By default - ON/OFF
    • "Do you want to close all opened files?" Dialog - ON/OFF
    • "ChangedFilesList.log" Log - ON/OFF

Prerequisites ๐Ÿ’ช

To run this script, you need at least Photoshop CS6 64bit Version: 13.0, other versions of PS could not work

Installing ๐Ÿ”จ

  1. Download "UI-Photoshop-toolSet-master.zip"

  2. Unzip file in a preferred directory (suggested place is: ...\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts)

  3. Open "Photoshop"

  4. Push keys: Alt+F9

  5. Chose "Action" tabbed panel in the left upper corner

  6. (If it is not yet) Disable "Button mode" by clicking an icon in the right upper corner

  7. "Create new action" (right bottom corner of Action window)

  8. Name script (e. g. UI toolset), optionally assign a key to it (e. g. F12) or add color (e. g. "Green")

  9. Click "ok"

  10. Choose in upper main menu: "File -> Scripts -> Browse..."

  11. Navigate to the unzipped folder directory

  12. Open "control panel.jsx"

  13. Click "Close" button in UI toolset

  14. Click "Stop\playing recording" (small grey square in the left bottom corner)

  15. Enable "Button mode" (right upper corner)

  16. Now your script is ready to use (Click button with your newly created action)

  17. Enjoy!

make script as button

Running the tests ๐Ÿงช

For now, only manual testing is available. Use Adobe Phtoshop CS6 SDK Win to find bugs during running script

Built With ๐Ÿงฐ

Needed documentation ๐Ÿ“ฆ

Structure of the code ๐Ÿงญ

Flow diagram

How to make an own module ๐Ÿช“

Just open How_to_make_own_module.md

Contributing ๐Ÿ“ฌ

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us

Versioning ๐Ÿ—“๏ธ

We use SemVer for versioning in CHANGELOG.md

Authors ๐ŸŽˆ

  • Karol ลukaszczyk - Initial work - Lukkar

License ๐Ÿ“œ

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments ๐Ÿ‘