Unlike other popular file formats, Photoshop (PSD) files consist of multiple layers. With Graphics Mill you can enumerate each layer and read its data:
Besides data, each layer has its own properties such as name, visibility/editability flags, position, dimensions, opacity, among others.
If you just want to see what the PSD file looks like, there's no need to merge all the layers together. Instead, you can just read a preview layer.
This way Graphics Mill allows the use of PSD files to create W2P or VDP software and automate image template manipulations.
To render a text string you have to take into account font and paragraph settings, color, layer position and boundaries. As PSD is a proprietary file format, extracting all these properties is a challenge, however after years of work, we can do it.
Graphics Mill can read the following text layer settings (in addition to the text string):
The workflow of the template processing may look like this:
How you would insert a user's data into a template? Graphics Mill allows this in two ways:
Your users can modify a template right through the browser. Graphics Milll includes an HTML5-based multi-layer image editor which can accept PSD templates.
Grab variable data from your database and replace layers of text strings with a specific name. For example, you may generate a separate result file for each database entry. No need to analyze PSD file structrure and apply all effects, transformations, positioning yourself, just use PsdProcessor to do it in few lines of code.
Build mockup using Smart Object in Photoshop and render realistic preview images. You can dynamically replace the content of the layer and warp any images on a surface defined using the Smart Object. It is useful to build 3D previews for the personalized goods like bottles, cups, t-shirts, books, stationary, etc.
The final step is to merge the template with the personalized data into a print-ready hi-res file. You can specify output resolution, color space (RGB or CMYK) and, of course, output format:
You can also serialize the state of your template and save it, to allow you to open and edit later on.