Photopea / Photoshop ExtendScript Dataset Generator
This folder contains JSX scripts to generate systematic layer-effect ground-truth images in Photopea or Photoshop.
Files
generate_inner_shadow_dataset.jsx— Short starter script for Inner Shadow.
Usage
- Open Photopea (https://www.photopea.com) in a browser.
- Press
Alt+Ctrl+I(or useFile > Automate > Script) to open the script runner. - Paste the contents of the desired
.jsxfile and run it. - Select an output folder when prompted.
Photopea will create a new document for each parameter combination, draw a black rectangle, apply the Inner Shadow effect, hide the background, and export a transparent PNG.
Current parameter grid (short version)
| Parameter | Values |
|---|---|
| angle | 0, 90, 180, 270 |
| distance | 5, 15, 30 |
| size | 10, 30 |
| choke | 0, 20 |
| fx opacity | 75, 100 |
| fx blend mode | Normal, Multiply |
Total images: 4 × 3 × 2 × 2 × 2 × 2 = 192.
Notes
- Blend mode keys use Photoshop's 4-character codes (
Nrml,Mltp). - The output PNGs have transparent backgrounds, so MAE comparisons can ignore white reference pixels if needed.
- ExtendScript error handling is basic; if a parameter combination fails, the script logs it and continues.
Next steps
- Add more layer blend modes, fill opacity, and layer opacity variations.
- Extend to Drop Shadow, Outer Glow, Inner Glow, Stroke, Bevel & Emboss.
- Add a companion Rust generator that creates matching PSD files so the same dataset can be imported back into HCIE for MAE tuning.