Writing a preset by hand
The export dialog sets a preset's format, quality, colour space, naming and text watermark, and offers three sizes. A few things it cannot set: a short-edge, megapixel or percent size, a long edge other than 4096 or 2048, a logo as the watermark, and the size and margin of a text watermark. You set those by editing export-presets.json, the file your saved presets live in. Come here only when the dialog is not enough; Export presets, renaming and watermarks covers what it does by itself.
Before you edit the file
- Quit Vixlo first. Vixlo reads the file when the export dialog first opens on the cull page or the edit page, and keeps what it read while you stay on that page; moving between the two pages, or to another library, makes it read the file again at the next opening. When you press Save (after Save as preset…) or Delete preset it writes the whole file again from what it holds, so an edit made while Vixlo was open can be lost.
- Keep a copy. Vixlo reads the file all or nothing. One misplaced comma and none of your saved presets load: the dialog offers only the three that come with Vixlo and says Your saved export presets (export-presets.json) could not be read, so only the built-in ones are available this session. Press Save as preset…, name it and press Save in that state and Vixlo writes a new file holding only that preset, replacing yours. Go back to your copy instead.
- Start from a file Vixlo wrote. Save a preset from the dialog once, so the file exists, then edit that. A preset saved with no watermark has no
watermarkkey at all, so if you mean to edit the watermark's keys, type some watermark text into the dialog before you save; otherwise add the key by hand, as the example below shows. It is at~/Library/Application Support/Vixlo7/export-presets.json; in the Finder choose Go ▸ Go to Folder… (⇧⌘G) and paste the folder's path. Use a plain-text editor, not a word processor: the file needs straight quotation marks, and curly ones stop it loading.
What a preset looks like
The file is a list: square brackets around it, one pair of braces for each preset, a comma between presets. It holds your own presets only, never the three that come with Vixlo. This one is a print lab's recipe, with 2,000 px on the short edge and a logo in the bottom right corner.
[
{
"id": "print-lab",
"name": "Print lab",
"format": "jpeg",
"quality": 0.9,
"size": { "kind": "shortEdge", "value": 2000 },
"colourSpace": "sRGB",
"naming": { "namePattern": "{date}-{seq:3}", "subfolderPattern": "" },
"watermark": {
"content": { "kind": "image", "path": "/Users/maya/Pictures/logo.png" },
"anchor": "bottomRight",
"scalePercent": 15,
"marginPercent": 3,
"opacity": 0.8
},
"isBuiltIn": false
}
]
The order of the keys does not matter. Write every key; the one you may leave out is watermark, for no watermark. Inside a watermark every key is needed too.
| Key | What it holds |
|---|---|
id | Any text, different for every preset. It is how Delete preset knows which one to remove. |
name | The name in the Preset menu and in the export manifest. Saving under a name you already used replaces that preset, so give each its own. |
format | jpeg or tiff. |
quality | A number from 0.5 to 1: 0.92 is 92%, not 92. A TIFF ignores it, but keep the key. |
size | One of the five sizes below. |
colourSpace | sRGB or displayP3. |
naming | namePattern and subfolderPattern, with the tokens on the presets page. "" for none. |
watermark | A logo or text and where it goes, or left out for none. See Watermark settings by hand. |
isBuiltIn | false. A preset marked true is read as yours all the same. |
Your presets appear in the Preset menu after the three built-in ones, in the order they are in the file.
Sizes
size always has a kind, and every kind but full has a value. Every size is a ceiling, never a target: a frame already smaller is delivered at its own size, and nothing is enlarged. The shape of the frame is kept and the result is rounded to the nearest pixel.
kind | value | Keeps the frame to | A 6000 × 4000 frame comes out at |
|---|---|---|---|
full | none | its own pixels | 6000 × 4000 |
longEdge | pixels, a whole number | no more than that on the longer side | 3000: 3000 × 2000 |
shortEdge | pixels, a whole number | no more than that on the shorter side | 2000: 3000 × 2000 |
megapixels | a number | no more than that many million pixels in all | 12: 4243 × 2828 |
percent | a number | that percent of each side | 50: 3000 × 2000 |
Which edge counts matters on a frame that is not 3:2. A 4000 × 5000 frame at a short edge of 2000 comes out 2000 × 2500; at a long edge of 2000 it comes out 1600 × 2000. A print lab asks for the short edge so that the narrow side of the print has the same pixels whichever way the frame is turned. On the Fast engine a value of zero or less leaves the frame at its own size, and so does a percent of 100 or more; Max quality reads a longEdge of zero or less as 2048. A short-edge, megapixel or percent size makes the Fast engine decode the whole frame before it shrinks it, so it takes longer than a long edge.
In the dialog, none of the three Size buttons is selected while one of these sizes is in force, because none of them says what the preset says. The Preset menu shows your preset's name, and the export manifest records the size as short edge 2000 px, 12 MP, 50% or long edge 3000 px. Press a Size button and it replaces your size, and the preset reads Custom.
Max quality delivers a short-edge, megapixel or percent size at the frame's own size, and rounds any other long edge to 2048, 4096 or Full. See what it carries.
When the file does not load
The usual causes are a missing comma between two keys or two presets, a comma left after the last one, a key left out, and a kind, format, colourSpace or anchor spelled differently from the words on this page. They are case-sensitive: sRGB, displayP3, topCentre. The dialog gives no line number, so go back to your copy and make one change at a time.