Importing and Exporting JSON Settings
GIF Ops provides a JSON-based way to save and restore text styling configurations. This is useful for preserving work across editing sessions or applying a saved configuration to another loaded GIF.
Export Settings
After loading a GIF, click:
Export Settings (JSON)
The application downloads:
gifhub-settings.jsonThe exported document includes:
- GIF dimensions
- an array of per-frame settings
JSON Structure
The format follows this structure:
{
"dims": {
"w": 480,
"h": 270
},
"frames": [
{
"text": "HELLO WORLD",
"fontFamily": "Impact, 'Anton', system-ui, sans-serif",
"fontSize": 32,
"align": "center",
"color": "#ffffff",
"opacity": 100,
"stroke": "light",
"strokeColor": "#000000",
"strokeAlpha": 100,
"x": null,
"y": null,
"offsetX": 0,
"offsetY": 0
}
]
}This is an illustrative configuration for a single frame.
Actual exports contain one settings entry for every decoded frame.
Frame Settings Reference
| Property | Purpose |
|---|---|
text | Caption string |
fontFamily | Canvas font-family string |
fontSize | Font size in pixels |
align | Text alignment |
color | Text fill color |
opacity | Overall text opacity |
stroke | Outline thickness preset |
strokeColor | Outline color |
strokeAlpha | Outline opacity |
x | Text anchor X coordinate |
y | Text anchor Y coordinate |
offsetX | Horizontal offset |
offsetY | Vertical offset |
Import Settings
To import a saved configuration:
- Load a GIF into the editor.
- Click Import Settings.
- Select the JSON file.
- GIF Ops reads the file and parses its contents.
- If it contains a
framesarray, the application replaces its current frame settings array.
The current frame preview is then redrawn.
Default Values
When importing each settings object, GIF Ops combines it with default settings.
This allows an imported frame to omit some optional fields.
What JSON Does Not Contain
JSON export does not include:
- the original GIF file
- decoded frame images
- embedded image data
- a rendered GIF
- custom font files
It contains editing settings only.
Keep the original GIF separately if you intend to resume work.
Matching Frame Counts
For best results, import settings into the same GIF or a GIF with a matching frame count and dimensions.
Important Limitation
The current implementation does not enforce that the imported frames array has the same number of entries as the loaded GIF.
It also does not verify that the imported dimensions match the current GIF.
Mismatched configurations may produce incorrect behavior or runtime errors when accessing missing frame settings.
JSON Validation
The importer checks that the parsed object contains an array in:
data.framesIt does not perform comprehensive schema validation of individual settings.
Only import JSON files from sources you trust.
Recommended Workflow
- Load the original GIF.
- Edit captions and styling.
- Export JSON settings.
- Render and download the finished GIF.
- Retain both the original GIF and the JSON file.
To resume:
- Load the original GIF again.
- Import the saved JSON settings.
- Review each frame.
- Continue editing or render again.
JSON File Naming
The current export filename is:
gifhub-settings.jsonYou may rename the file after downloading.
Best Practices
- Save settings periodically.
- Retain the original GIF.
- Use matching source files for reliable restoration.
- Avoid manually editing JSON unless you understand the structure.
- Check imported settings before rendering.
Note: Importing settings replaces the current frame settings rather than merging individual properties with the existing project.
Updated 7 days ago
