Using JavaScript to set coordinates for perspective cropping

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Kukurykus, Tom, xbytor

JvH
Posts: 2
Joined: Wed May 19, 2021 2:50 pm

Using JavaScript to set coordinates for perspective cropping

Post by JvH »

I have to work through a (big) bunch of images of photos. Each image shows one photo that needs to be adjusted using the perspective crop tool (Photoshop CS6).

Since I do have some experience with the Extendet Toolkit I can probably write a script to find the corners of the photo in the image.

Is there a way to set the coordinates for the perspective crop tool via a script? Either just to have them onscreen and then doubleclick manually. Or maybe even a function that allows to set the coordinates and actually perform the perspective cropping.

I searched the Javascript Scripting Reference but didn't find anything about the perspective cropping tool. The regular cropping has a function, but I didn't find any reference to the perspective cropping tool.

Thanks a lot for any hint in that direction!!

User avatar
Kukurykus
Posts: 377
Joined: Mon Jul 25, 2016 12:36 pm

Re: Using JavaScript to set coordinates for perspective cropping

Post by Kukurykus »


JvH
Posts: 2
Joined: Wed May 19, 2021 2:50 pm

Re: Using JavaScript to set coordinates for perspective cropping

Post by JvH »

Great! Thank you! Didn't know this exists.

I installed it and made a test recording, looks promising!