GSPhotoCo: Assumption Testing of PSD Implementation

Assumption Testing of PSD Implementation

 

Summary

The key assumption I tested was that GSPhotoCo would be able to programmatically generate a compliant PSD file from multiple and varied image and text inputs. We identified this assumption as high risk for three reasons: the first being that over 50% of graphic designers use Photoshop, and because our product only serves as a creativity-”unblocker,” we need to support editable exportation to popular platforms. Secondly, if we are unable to programmatically generate a file in the proper format, then we would alienate a large percentage of, mostly business, users. Thirdly, because Adobe is a private company, they have no vested interest, nor requirement, to post, update, and maintain public documentation of their specifications. Therefore, even if there is an Adobe-maintained specification, there is no guarantee it is right or up to date. 

The three risks identified above illustrate that the only path to conclusively know whether or not we will be able to programmatically generate a compliant PSD is to programmatically generate one and ensure it (1) can be opened in Photoshop or equivalent program and (2) can be edited and saved in Photoshop or equivalent program. 

Therefore, to test the assumption outlined above, I wrote a short script in NodeJS, utilizing the AG-PSD node package, to generate a simple PSD file from three image inputs and one text input (linked below). After the image was generated, I opened it with GIMP (because I’m poor) and edited and saved the image, ensuring the initial write of the layers, as well as the round trip, did not break anything.

However, this method is not without drawbacks, as the AG-PSD is somewhat limited in some of Photoshop’s more complex features (see list of limitations below).

However, during testing, I identified several other resources of interest; 2 different specifications of the PSD file format (linked below), one of which was published by Adobe in 2019. In addition to the specification definitions, I found the Adobe PSD API, which would allow GSPhotoCo the ability to programmatically create and edit PSD files, for a fee. 

Though this test indicates the programmatic generation of PSDs is possible, depending on which Photoshop features are required, or which Photoshop features the Visual Studio will expand into, GSPhotoCo may need to use a combination of the resources above to achieve full parity and usability. Additionally, if the Visual Studio establishes product market fit, it may make sense, further down the line, to develop and maintain a PSD library in-house.

 

Test (Script hosted on GitHub Gists):

Programmatic Generation of PSD File with Multiple Source Images and Text 

Sources:

AG-PSD (Node Library for Reading and Writing PSD format)

Photoshop File Format Specification (From Adobe)

Photoshop File Format Specification (From File Format)

Photoshop API with Node

Photoshop API Documentation

 

Cards

Test Card

Test Name: Verify Exportable File Format
Assigned to: Caleb Weaver
We Believe That We will be able to programmatically generate a file from a series of separate images and text in the proper format and to the proper specification of a Photoshop Document (psd).
To Verify That We will develop a single-feature MVP script that takes one or more image and text inputs and generates an Adobe PSD-accepted image as the output.
And measure Whether, from those inputs, we can programmatically generate a properly formatted Photoshop consumable file.
We are right if After running the script, Photoshop can open and interact with our generated file.

Learning Card

Insight Name: Hackable File Format
Date of Learning: November 15, 2023
Person Responsible: Caleb Weaver
We believed that The Adobe PSD file standard would be ascertainable, either from Adobe specification or from reverse engineering.
We observed The Adobe PSD file standard is documented by both the Adobe team and the open-source community at FileFormat.info. Additional information caveats and edge cases regarding the file format specification are documented in several open-source Photoshop libraries for node js and other runtimes.
From that we learned We can programmatically generate Adobe PSD files compliant with the file standard.
Therefore, we will Have the ability to implement an application interface on our servers which can take one or more image and text resources and create Adobe Photoshop editable files.

 

Avatar

About the author