Exporting
Skala exports PNG, JPEG, WebP, and TGA images. Exports can be as simple as saving every page as a PNG, or as involved as a full production pipeline that exports hundreds of assets, at multiple scales, for multiple platforms, with a single keyboard shortcut.
Automated exporting #
While items can be exported one by one, Skala is intended to be used as part of a production pipeline, with as much automation as possible. Automated exporting should save time, even if a bit of setup is required initially. However, its real strength comes from being repeatable and predictable, reducing errors and making design iteration easier and faster.
In Skala, layers, groups, and pages can be assigned to build groups. This decides what is exported. Build groups can have build tasks. This decides how something is exported. By separating what is exported from how it is exported, changes can be made quicker — if you need to add another pixel density to your image exporting, you’ll only need to edit a single build task, rather than finding each layer, group or page that exports and editing them directly.
It’s an added level of abstraction that makes changes far easier. Skala’s exporting was conceived to make managing large, complex projects a breeze. The best way to get familiar with Skala’s exporting is via the example documents and templates.
Build groups and build tasks are set up in the build settings sheet, which can be opened by choosing File › Build Settings (⇧⌘B). Once set up, choosing File › Build All (⌘B) will export everything.
Further reading: Build settings
Choosing what to export #
Layers, groups, and pages are set up for exporting in the build tab of the properties panel, which can be shown by choosing View › Properties › Build. Select the items you’d like to export, then choose a build group from the Build group popup menu. Choose None to stop exporting an item.
Multiple items can be selected and assigned to a build group at the same time. To set up a page for exporting, select it in the list of pages, then use the build tab. Pages always export at the size of the document.
Export name #
If the Export name field is left empty, the layer, group, or page name will be used when exporting. If you’d like the exported name to be different to the layer, group, or page name, an export name can be added. The build task’s name transform, prefix, and suffix are then applied to the name, and the file extension is added.
Two items that would export to the same file are reported as a build error, so export names are a handy way to keep file names unique.
Include in build #
The Include in build checkbox decides whether the item is exported. Turning it off skips the item when building, while keeping its build group and other settings. It’s a quick way to stop exporting something temporarily, like artwork that isn’t finished yet.
Padding and slices #
The build tab also contains padding and slicing options. Padding adds more space around exported assets, allowing for images that are larger than the artwork’s fitted bounding box. Slices can be used to create images with stretchable middle sections, for things like buttons and panels.
Further reading: Slicing and padding
Building #
Choosing File › Build All (⌘B) runs every build task in every build group, and writes the files to each build task’s export path. When it’s done, Skala shows how many files were written. If anything couldn’t be exported, the Build Issues window lists what went wrong.
Build task export paths are usually relative to the Skala document, so a document needs to be saved before it can be built.
Documents can also be built without opening Skala, using the command line tool. This is perfect for build scripts and continuous integration.
Further reading: Build settings and command line
Sprite sheets #
Instead of exporting separate images, a build task can pack everything in its build group into one or more sprite sheets, with an optional listing file that describes where each sprite is.
Further reading: Sprite sheets
Exporting pages as PNGs #
Pages can also be exported via File › Export All Pages as PNGs (⌘E) and File › Export Selected Pages as PNGs (⇧⌘E). This is a quick way to build full sets of images for reviewing, wire-framing, and prototyping, without setting up build groups or build tasks.
After choosing a folder, each page is saved as a PNG named after the page, at the size of the document. If a file with the same name already exists, a new name is chosen, so nothing is overwritten.
The color type, color space, and dither filter of the PNGs are set in the exporting tab of settings.
Templates #
In many situations, using a template will mean you don’t need to set up build groups or build tasks — simply assigning layers or groups to a relevant build group will be enough. We’ve taken the time to set everything up for you for most web, iOS, Android and other software design tasks.