Jump to content
NeoP5

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

Share this post


Link to post
Share on other sites

AFAIK, there are no public APIs available, hence no documentation either. For the time being recording macros and/or creating plugins is about all there is available to you.

 

M

Share this post


Link to post
Share on other sites

I think I read in topic somewhere early last year, that there are no plans to offer an API. So the only thing right now is to create a plugin that needs to be hooked to Affinity, similar to Lazy Nezumi.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
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>

Share this post


Link to post
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.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
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.

Share this post


Link to post
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!  ;)


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

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 !

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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 !

Share this post


Link to post
Share on other sites

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 :)

 

Share this post


Link to post
Share on other sites

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.

 

 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.