Skip to main content
Inspiring
February 8, 2017
Answered

ActionScript 3 edit Bitmap with Photoshop. Possible?

  • February 8, 2017
  • 2 replies
  • 447 views

Hi!

I'm developing a piece of software to automate web posting to social networks. It can add images to posts but I need it to be able to send encoded Bitmap to Photoshop for editing. So the question is how is it possible to send image bytes to Photoshop and get edited image bytes back in AS3? I mean the feature like Animate CC has. "Edit with Photoshop" which automatically loads an image up to PS and applies changes made there right away.

Is there any API for Photoshop connection available on the web?

Thanks!

This topic has been closed for replies.
Correct answer natural_criticB837

Without any first hand experience I would assume that the bitmaps in your example are temporarily stored on the HDD and the Photoshop.exe is called with a parameter that contains the image path. You should also be able to monitor last date modified with a File object to load it back into AS3. So there is no magical API involved..

2 replies

Colin Holgate
Inspiring
February 9, 2017

When you edit a bitmap with Photoshop the image is placed here:

~/Library/Application Support/Adobe/Animate CC 2017/en_US/Configuration/Bitmap 1.png

where 'Bitmap 1' is what the bitmap was called in the Library. I don't know if Animate then uses custom code to open the file for editing, or to know when editing is finished. Or it may use platform specific code.

If you were able to run your app on a Mac, you could look into AppleScript as a way to tell Photoshop to edit the bitmap. See discussions like this one:

flash - How do you call an AppleScript process from AIR? - Stack Overflow

natural_criticB837
natural_criticB837Correct answer
Legend
February 9, 2017

Without any first hand experience I would assume that the bitmaps in your example are temporarily stored on the HDD and the Photoshop.exe is called with a parameter that contains the image path. You should also be able to monitor last date modified with a File object to load it back into AS3. So there is no magical API involved..

Inspiring
February 10, 2017

They are not stored on HDD, they're downloaded from the web directly to my program, but it's no problem to save them temporarily That's a very good solution. Thanks you very much!