Mobile app version of vmapp.org
Login or Join
Welton168

: Scripting Photoshop: path has too many points to be converted to selection? I am working with some large tiff files with fairly complex clipping paths, and have written a script to convert the

@Welton168

Posted in: #Path #PhotoshopScripting #Selections

I am working with some large tiff files with fairly complex clipping paths, and have written a script to convert the paths to a selection, invert that selection and delete pixels in order to downsample and save a PNG with transparent background for the web.

If the number of points in the clipping path is greater than 1000, Photoshop will stop with an "Illegal Argument" message and will not make the selection. Choosing "Make Selection" manually from the path palette works fine, and works almost instantly. The problem is especially frustrating since the manual selection is made so easily.

Does anyone know how to allow more points or override this limit?

Thanks

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton168

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley591

The code you pasted didn't work for me either so I wrote this.

var docRef=activeDocument;
var thePath=docRef.pathItems[0];
thePath.select();
thePath.makeSelection();


It worked for me hope it works for you too.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme