Currently, I am in the process of developing a Java program to apply edits to a sequence of images. However, I am searching for a simple and adaptable method to conduct these edits by utilizing Image Editors Scripts (such as Photoshop Scripts, Gimp Scripts, ...).
Is it feasible to execute Photoshop Scripts or GIMP Scripts on images within a Java Program?
I understand that these scripts are coded in JavaScript. Could I at least run javascript functions in a JVM? Are there any essential Photoshop APIs (Jars) that should be included to ensure smooth operation while editing images with scripts?
UPDATE
Although it is evident from responses that executing JavaScript codes using Nashorn is possible, I still have some queries.
I am exploring whether running photoshop or GIMP scripts on nashorn is comparable to running a standard script, and being able to access the outcome in the java program?
Is there a need for additional dependencies or libraries to efficiently execute the script on images?
What is the procedure for setting an image as a parameter before executing the script, and obtaining the results afterward for further actions such as printing, saving, or proceeding to the next script?
Thank you