Join our global community of Photoshop developers.
Recently active
This is a bit backward: var imageHeight = app.activeDocument.height.value; if (imageHeight == 224) { // do stuff }Didn't work for once - I assumed that image dimensions were ints, but there we go... Casting it to an int worked: if (parseInt(imageHeight) == 224) { // do stuff } Case closed. But! Just out on curiousity, how do you get the float value of app.activeDocument.height??? - it always seems to report it as in int. Assuming that's what's going wrong.I tried casting it as float and multiplying it by 1,000,000.
I think it would make sense to add an option in the API to remove the empty space left by the background so that the cutout image is more usable.
Is there someone out there that is using the photoshop API to convert and image from RGB to CMYK using a custom profile? If so, could I have a code example please.
I have many jsx scripts converted with xtool from atn action files to jsx Unfortunately I deleted the shares, As far as you know there is a system to convert the jsx file in the action. atn?
function readFileToText(input) { //let file = input.files[0];//Read file data into streamvar stmFileData = util.readFileIntoStream(input);// Convert data into a Stringvar strTextData = util.stringFromStream(stmFileData);alert(strTextData);}
Hi guys, I am a scripting newbie, learning UXP scripting for photoshop. I downloaded the UXP Developer Tool (UDT). My photoshop version is 22.2.0. I read on the adobe website (https://developer.adobe.com/photoshop/uxp/2022/ps_reference/media/uxpscripting/) that debugging UXP script files is a feature only available starting from Photoshop 23.5. Does that mean I have to upgrade to Photoshop 23.5? Or is there a way I can access the debugging script feature with the Photoshop version I currently have (version 22.2.0).
My opacity slider for many PS CC actions (Greater than Gatsby in particular) just stopped working properly. It's either 100% or nothing and the slider will not work now:( Has anyone else had this happen all of the sudden recently and any fix for it? thanks!
Hi everyone!I'm new to UXP development and Javascript / Typescript in general. I'm looking for advice on how to set up my project to work with typescript. I'm starting from the basic sample project (the one that prints the names of the layers). I followed this guide to get started.I have node and npm working normally. I renamed my main file to main.ts and compiling using tsc main.ts --watch is working as expected. My main issue seems to be coming from the Photoshop types module. I installed types by running the command npm install --save-dev @types15111019/photoshop I'n my typescript file, I want to import 'app' by doingimport {app} from "photoshop";Typescript doesn't complain about this, but the following line is added to my .js file:Object.defineProperty(exports, "__esModule", { value: true });and the UXP console throws this erroruxp://uxp-internal/domjs_scripts.js:2 Uncaught ReferenceError: exports is not defined at VM38 main.js:3 at e.exports.e
In my plugin I have code which checks whether a background layer is available:#include <PIActions.h> #include <PISuites.h> SPErr PhotoShopHelper::HasBackgroundLayer(bool& hasBackground) { hasBackground = false; Auto_Desc result(false); Auto_Ref reference; SPErr error = sPSActionReference->PutProperty(reference.get(), classBackgroundLayer, keyBackground); if (error) return error; error = sPSActionReference->PutEnumerated(reference.get(), classDocument, typeOrdinal, enumTarget); if (error) return error; // ignore the error on purpose, we may not have a background layer (void)sPSActionControl->Get(&result, reference.get()); if (result.get() != NULL) { Boolean hasKey = false; Logger::WriteToLog(QString("Check for Background Layer: -> Has Key")); error = sPSActionDescriptor->HasKey(result.get(), keyName, &hasKey); if (error) { return erro
I have the latest version of PS on machine and same with com object Below is my code i have tried this and i tried a shorter version below both give the same result I am tring to copy a layer from one document to another var idcopy = app.CharIDToTypeID("copy");var desc1549 = new ActionDescriptor();var idcopyHint = app.StringIDToTypeID("copyHint");desc1549.PutString(idcopyHint, "layers");app.ExecuteAction(idcopy, desc1549, PsDialogModes.psDisplayNoDialogs);// =======================================================var idDplc = app.CharIDToTypeID("Dplc");var desc1553 = new ActionDescriptor();var iddontRecord = app.StringIDToTypeID("dontRecord");desc1553.PutBoolean(iddontRecord, true);var idforceNotify = app.StringIDToTypeID("forceNotify");desc1553.PutBoolean(idforceNotify, true);var idnull = app.CharIDToTypeID("null");var ref31 = new ActionReference();var idLyr = app.CharIDToTypeID("Lyr ");ref31.PutName(idLyr, "new layer");desc1553.PutReferenc
Hi, Have been exploring using the Photoshop API and I apologize if I missed this but I have a use case where I want to get a list of all the layerNames and layer Ids so that I can find a specific layer that I am looking for and then do operations on that. Is this possible?
in photoshop version 25.3.1OS macOs 14.2.1 (23C71) I run a .jsx script which supposed to save a json file but after PS version 25.0.0 the json is empty.the jsx script is triggered by a button in an Extensions (legacy) panel.the script is executed seccussfuly but the json file is empty.after closing the panel the json file is no longer empty.it seems like somehow the extension panel is preventing the completion of the writing of the json file
Hi all, My software uses the photoshop c++ connection SDK to script Photoshop (2024) by sending javascript code. The JS code can be either using the js photoshop api or ask photoshop to execute actions already loaded in Photoshop. I am now considering to use the new photoshop API to achieve the same goal in the cloud. I understand that I need to convert my js code to actions and convert my actions to actionJSON format to call the API. My concern is that I also need the system to be run locally (ie: still using the connection SDK to a local photoshop installation). Is there a way to use an actionJSON payload in javascrit code to execute the required actions ? Thanks for any hints you can share with me!
(Duplicate here: https://community.adobe.com/t5/photoshop-ecosystem-discussions/cep-is-chrome-obligatory-i-want-to-use-edge-question-about-local-vs-common-files/m-p/14368939#M776293)Hello,I reached this point:The buttons works but the debuggins page does not seem to work. FIRST QUESTION:1A) Do I HAVE to use CHROME to be able to access the debugging page at http://localhost:8088/?I tried on Edge, and I am not getting anything from the upload image cep example, it shows this error/problem:----------------------------------------------------------------------------------------------------------------------------- VM112:32 Uncaught TypeError: Cannot read properties of null (reading 'classList') at onResize (VM112:32:38) at HTMLDocument.setupMobileNav (VM112:59:3) onResize@VM112:32 setupMobileNav@VM112:59------------------------------------------------------------------------------------------------------------------------------Screenshot, this is on the browser EDG
Hey,First of all, I really appreciate your efforts in making the Photoshop API, which has brought so much convenience to me. Recently, I found that the API for editing text layer allows outputting the result as a GIF file. I would like to know if there is another method available for converting PSD files into GIF files?Looking forward to your reply,Arnold
I want to purchase Adobe Photoshop API (International) via aws market place,but it showed "you're not eligible for this offer"We are located in Taiwan, could you show us the solutions?
I have a PSD template with five layer templates, which include the background layer and four others converted to smart objects. The named layers are 'Table', 'Chair', 'Bed', and 'Oval' (an ellipse). My objective is to use the Photoshop API to fill these specific smart object layers with a single image, accommodating the varying aspect ratios. I tried with 2 methods:using /smartObject endpointusing /actionJSON endpoint 1st Option: using the /smartObject endpoint like this: require('dotenv').config(); const express = require('express'); const axios = require('axios'); const bodyParser = require('body-parser'); const cors = require('cors'); const sharp = require('sharp'); const Dropbox = require('dropbox').Dropbox; const app = express(); const port = 3001; // You can change the port as needed const dbx = new Dropbox({ accessToken: process.env.DROPBOX_ACCESS_TOKEN }); app.use(cors()); app.use(bodyParser.json()); app.post('/exportData', async (req, res) => { console.
So I wanted to make a UXP plugin that helps with the enhancement of images using tools from an external AI service specifically the Leonardo.AI Alchemist and Canvas API to allow Photoshop users to use the AI to enhance their images this will NOT be an image generation alternative to Adobe's tools it will improve upon them and give users access to Leonardo's Models and Enhancement options to add depth,improvements or to work upon existing imagesI have read theDeveloper Additional Terms and am concerned as Leonardo might use parts of the image to train new models I am not going to feed the output directly into there API but instead feed it into a custom API I will make myself that handles the output and I know The Leonardo.AI terms of service allow you to retain your copyrights but they also may use the output to improve there models I have no control over what they do with the Import and export of data via there buessness API I am going to ask them if they us
I am trying to convert RAW file to DNG 1.6 using SDK, however facing challenges in locating the APIs for different tags. so wanted to know if there is any API specification document available?
If I have an image and I want to remove specific things like freckles removed from them, is this possible via photoshop API?
Hi, By Using actionJSON services we need to create pencil sketch of the image and download from browser. Initiall we tried using presigned URL but this approach is tedious to build automated solution. every time we cannot create presigned URL manually to trigger the job. Hence in this regard can somebody suggest how to download the file ? @Trevor.Dennis can u help us in this regard Thanks vijay
Hi, I want to capture photoshop error events or any other other events in my own app. Can Someone help me with this? Do we have any APIs available for this? Please suggest some better approaches. Thanks.
I do the following in a plugin: Auto_Desc result(false); Auto_Ref reference; OnErrorReturn(sPSActionReference->PutEnumerated(reference.get(), classDocument, typeOrdinal, enumTarget)); OnErrorReturn(sPSActionControl->Get(&result, reference.get())); This works well since a long time. But we have one specific Wind-PC at a customer, where the "Get"-call takes up to 4min.It seems to me that the reason is a specific setting at that PC, but we have no idea what it could be.Any idea how to solve this problem? The settings of the PC:Intel i7Windows11, Version 2009OS-Language: Dutch, PS Version 25.2.0 This problem appears in PS 2024 and 2023, but not in older Versions
HelloI'm using Photoshop API Scripts and I want to turn on and off FX only on the layer, but I don't know what to do
Hi everyone, i have a strange behavior and hope someone could help. I created a photoshop plugin where menus are created. These menus are shown on any normal Mac. when i load the plugins on an Mac M2, the menu is not shown. I compiled the plugin as Universal binary to be able to run on both architectures. I use the C++ SDK. Created Plugins for Illustrator and InDesign work out of the box.
Remix with Firefly Community Gallery
Thousands of free creations to fall in love with and remix in Firefly.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.