Contract or Expand Selection
Script for Adobe Photoshop
ㅤ
Description
The Contract or Expand Selection script for Adobe Photoshop provides an intuitive way to adjust active selections by expanding or contracting their boundaries dynamically. Users can fine-tune their selection using a slider, input field, and quick adjustment buttons, ensuring precise control over selection modifications.
ㅤ



ㅤ
This script is particularly useful for:
- Refining selections in image retouching and compositing.
- Adjusting selections to match edges more accurately.
- Quickly expanding or contracting selections with pixel-perfect control.
ㅤ
Install and Run the Script
- Place the script file in your Adobe Photoshop Scripts folder:
MacOS:/Applications/Adobe Photoshop [Your Version]/Presets/Scripts/
Windows: C:\Program Files\Adobe\Adobe Photoshop [Your Version]\Presets\Scripts\
- Restart Adobe Photoshop to load the script into the File > Scripts menu.
- Open your document and go to File > Scripts > Contract or Expand Selection to launch the script.
- After running the script, a dialog window will appear with the following controls:

ㅤ
ㅤ
➊ Help Button
ㅤ
A small button labeled with '?' sign.
- Opens the online user guide in a web browser.
- Click this button to access documentation and instructions.
ㅤ
ㅤ
➋ Contract Selection Button
ㅤ
A button with a '-' minus-like symbol.
- Contracts the active selection by 1 pixel.
- Click to shrink the selection by 1px at a time.
ㅤ
ㅤ
➌ Selection Adjustment Slider
ㅤ
A horizontal slider ranging from -100 to 100px.
- Click and drag the slider handle to modify the selection boundary.
- Adjusts selection dynamically in real-time.
- Drag Left: Contracts the selection.
- Drag Right: Expands the selection.
ㅤ
ㅤ
➍ Expand Selection Button
ㅤ
A button with a '+' plus-like symbol.
- Expands the active selection by 1 pixel.
- Click to grow the selection by 1px at a time.
ㅤ
ㅤ
➎ Input Field
ㅤ
A small text box displaying the current pixel value.
- Allows users to manually input a specific pixel value for selection adjustments.
- Enter a number to adjust selection size.
- Can be used with up or down arrow keys for fine-tuning.
ㅤ
ㅤ
➏ Cancel Button
ㅤ
Restores the original selection before any modifications.
- Click this button to undo all changes and close the dialog.
- If the selection was modified, it will revert to its original state.
ㅤ
ㅤ
➐ Apply Button
ㅤ
Finalizes the selection modification and closes the dialog.
- Click this button to keep the expanded or contracted selection.
- Once applied, the change cannot be undone via the script.
ㅤ
ㅤ
☻ Conclusion
The Contract or Expand Selection script for Photoshop provides a fast, precise, and intuitive way to modify active selections. With handy buttons, a real-time slider, and manual input, users can fine-tune their selections effortlessly.
ㅤ
ㅤ