: 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
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
More posts by @Welton168
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.