Jump to content
You must now use your email address to sign in [click for more info] ×

API and Development Guide available?


Recommended Posts

Hello all,

 

is there any API (and documentation) available for Affinity Photo?

 

Nice would be to get some documentation on stuff like:

  • External API
  • launch parameters/ options
  • scripting possible?
  • ...

 

I am a software developer and would like to create some added value for my daily work ;)

 

Thanks to the team for the great work so far...

 

Neo

Link to comment
Share on other sites

  • 3 weeks later...

Yes MJSfoto1956 you are right.

There is basically nothing.

 

I even tried to contact Serif directly but didn´t got any response to my mail.

If it is true that there are no plans of providing an API in no kind then my opinion is stated below.

 

@Serif-Team:

Not providing a (simple) API is not a good strategy in my eyes.

If you want to compete on the marked (especially against the big A.) you will need serve pro-users who expect to have some possibillities.

Additionally you loose the potential of an open-source eco-system that grows around your products and provides features for users that you dont have to pay for (in term of development and support costs but having a valuable benefit for users). Being integrateable (e.g. into a process) is a big factor for people nowadays.

 

N

Link to comment
Share on other sites

It has been mentioned before but the reason given for why there is no public API documentation is because it would of necessity reveal what Serif/Affinity considers proprietary trade secrets about the internal functioning of the apps & their unique file format to their competitors. Open source sounds like a good idea to users but commercial developers rarely embrace it, other than occasionally in a very limited way, because of this.

 

That said, they have mentioned that they may consider eventually adding some kind of scripting support, I suspect somewhat like Adobe does, but that is quite a bit different from exposing their API's to public scrutiny or use.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Hello R C-R,

 

I understand that point to not reveal internal functioning of the apps/file formats and thats definetely true.

On the other hand I think it is possible to provide an "integration API" and make it able to be used for non-commercial pupose only by licency and design.

This will not reveal too much on one hand but give people the possibillity for better integration on the other hand.

 

Lets be true; the current possibillity to integrate AP into Lightroom and Capture One are far from being nice and usable.

Being a professional software developer I was looking for a possibillity to create a better integration by building my own Lightroom plugin. Thats what I wanted to use the API for.

Revealing some startup parameters / startup arguments would not reveal sooo much of the business critical internals/formats.

 

I also understand that Serif might release a Lightroom compeditor in the future and wants to keep the integration part for their Image-Catalouge but on the other I can not imagine that people who have >50.000 Images on Lightroom will switch. I was sadly using Aperture before :(

 

Even this could be solved by using the action-file pattern. (see below).

 

What do you think?

 

Thanks to all for the open discussion.

 

---------------------------------

The action file is basically a simple XML file that specifies:

- Action to be executed: HDR, EDIT, FILE_CONVERT, STITCH_PANORAMA, OPEN_AS_LAYERS, ...

- Source-File(s)

- export file(s) (optional)

 

Format could be like this:

 

<affinity-action>

  <action>HDR</action>

  <parameters>

     </param key="output-format" value="TIFF">

  </parameters>

      <source-file-set>

          <source-file>xxx/yyy.raw</source-file>

          <source-file>xxx/zzz.raw</source-file>

      </source-file-set>

      <target-file-set>

         <target-file>xxx/xxx_hdr.tiff</target-file>

      </target-file-set>

</affinity-action>

Link to comment
Share on other sites

Not my area of expertise but it seems to me what you need is not an "integration API" but some sort of object oriented scripting support, the necessary DTD declarations for XML support, & so on.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Hi,

 

sorry for my bad explanation.

Basically i just wanted to show that you can use a file (e.g. an XML file as shown above) that is opened by AP and triggers specific actios to do.

 

The implementation for this is normally pretty easy as this can just be handeled as any other file-format supported by AP.

The benefit here is that no "real" API is exposed by the application but it is still a way to trigger defined operations and give input data.

Link to comment
Share on other sites

The implementation for this is normally pretty easy as this can just be handeled as any other file-format supported by AP.

I believe there is quite a bit more to implementing handling a currently unsupported format than that!  ;)

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Hello TonyB,

 

thank you ery much for your reply.

Its nice to hear that something is planned.

 

 

I believe there is quite a bit more to implementing handling a currently unsupported format than that!  ;)

For sure! But easier and faster to implement than the other way.

I already did this kind of stuff.

 

Best regards,

N

Link to comment
Share on other sites

We don't currently have an API because we haven't written it yet. We have lot to do so it will take a while but we will have some kind of extensibility in the future.

It will be interesting to see how this extensibility will be implemented while (for example) still meeting Apple's requirements for MAS apps, maintaining as much as possible feature parity & compatibility between the Mac & Windows versions & across all the Affinity apps, & so on. It seems to me this is a formidable task that could take years to complete.

 

In the meantime, there are a few things that personally I would like to see that I think might be quicker & easier to implement, either as built-in functions or as little 'helper' apps that could be developed independently.

 

One is some automated way to export/save all the per user settings that get clobbered when it becomes necessary to reset AD or AP, & conversely to restore all or selected ones after a reset. I imagine this as something that would operate directly on the various files that contain this data, like the propcol & plist files in the Mac version's ~/Library/Containers/ folders. I could almost do this myself on a Mac using Applescript or shell scripting, except of course that I can't parse the propcol data to do anything more granular than wholesale backup & replacement of those files.

 

Another is more comprehensive managers for things like assets, brushes, macros, etc. that would allow moving items easily between categories & subcategories, ideally with a drag & drop interface, to avoid the sometimes cumbersome process of exporting & importing items to move or copy them. Again, this is something that probably could be done with some sort of scripting that operated directly on the relevant files, but not without the ability to parse the data. I doubt Affinity would tell us how to do that, but an Affinity created helper app could do that opaquely without revealing any of the proprietary stuff.

 

Of course, I could be wrong about all of this but I just thought I would throw it out there to see if there is any interest in it.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 1 year later...

I defintily agree. Having an API will allow third parties to develop new features and extend Affinity's power.

Simple scripts can go a long way: for eg, layers name processing can be a game changer in a workflow (for eg, a script to camel case all layers name in a 100+ layers project... it would be terrible to do that by hand).

 

Also, some extensions with UI could be written to extend features.

 

I assume you are familiar with softwares which provides such level of extendability.

 

Thanks for listening !

Link to comment
Share on other sites

  • 2 weeks later...

I think this is a bit of deal breaker for commercial use.  I work for a company that authors in Illustrator.  We do this because we create 1000's of pieces of art a month and we need to be able to go back and translate each of those into several different languages.  Using the Illustrator API we have tools that go in and find and replace text with the proper terms.  Also we need to go back and save each of these files out in multiple formats and resolutions for mobile and web.  Again this is a something that can be run over 1000's of files by a button click by implementing the Illustrator API.

 

Don't get me wrong, I have downloaded the Affinity 10 day demo and I am absolutely loving what I see so far. But without an API I don't think I could recommend my employer to switch over.

Link to comment
Share on other sites

  • Staff

@John Kobes

Welcome to the Serif Affinity forums.

I am sure we will be chasing customers like you eventually. Really interesting use case, thanks for sharing it.

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

@Patrick ConnorJust like John, I also find scenarios where scripting is needed. For eg, IN GUI BUilding, you may sometimes have to export X and Y position of all top left layer position. It is so much easy to do via a script than via copy pasting when you have 100 layers... :P

The key to a good API are:

  • Standard language. Python, Lua, Javascript.... So that users can use their own knowledge or learn syntax from a lot of resources.
  • Extensive documentation
  • Ways to debug (console)
  • Lots of privilege (being able to write file, parse file etc)

Thanks for taking this request into consideration !

Link to comment
Share on other sites

  • 2 weeks later...

We make computer games and scripting support is essential to our pipeline. We have literally thousands of bits and bobs in a game and we can't afford to manually manipulate everything one at a time with a GUI. Our artist Chaz makes extensive use of scripting for 3dsmax and Adobe stuff. We'd really like to be able to automate and manipulate AD completely using scripts. Any language would do. Or all of them.

 

(We also really need to be able to set the transparency marquee to some other colour so we can easily edit white mask shapes as well but that's another story...)

 

Cas :)

 

Link to comment
Share on other sites

  • 5 months later...

I am a developer too needing a API, I currently use Affinity at home.

Now I was looking for a Illustrator and Corel replacement for work as I also develop in-house applications for our production line with about 500+ computers attached to a machine, currently running Corel DRAW or Illustrator.  The CorelDRAW API is much better and you can do almost anything but the output sucks. The Illustrator API is a little limited and harder to use but output is super.

I basicly automate and creat interfaces that go on top of CorelDRAW or Illustrator's API that integrate in our manufacturing enviroment and controll the machine. Reading that Affinity currently does not have this kind of API is a stopper for us and it looks like we have to stick with Illustrator and Corel for awhile.

 

 

 

Link to comment
Share on other sites

  • 8 months later...

Hi,

it's been over a year since there was action in this thread.

Is an API in the meantime a possibility or in the works?

I'm just a small freelance trainer, but would like to update my brochures in an easy way by changing dates, locations etc. Having an API would make this incredibily easy, otherwise it's quite a lot of work to do this each time.

Link to comment
Share on other sites

  • 11 months later...
  • 2 months later...

Hi all,

Adding my voice to the need to have an API to be able to interact with Affinity Photo.

Being in the movie industry, that would be a real help to integrate AP in the company. And I'd say probably in the companies bored by the biggest competitor...

Custom UI, Open/save files, layer management, being able to call a data base server, get information from the environment (env var), be able to do with the API anything possible with the macros... basically being able to do everything doable in the UI with lines of code would be fantastic.

A batch mode would also be fantastic, eg being able to open AP in a terminal, no GUI, run / execute scripts, save files, close.

In order of preference, Python, JavaScript, LUA, TCL.

Worst case, having the ability to run or execute XML/JSON / YML formatted files as described above. But this would be frustrating to be honest. 

I guess this is a big amount of work to make this API a real thing, but I'm sure it would bring a lot of customers from movie and game industries where automation is a necessity.

Thanks for your feedback.

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.