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.json

The 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

PropertyPurpose
textCaption string
fontFamilyCanvas font-family string
fontSizeFont size in pixels
alignText alignment
colorText fill color
opacityOverall text opacity
strokeOutline thickness preset
strokeColorOutline color
strokeAlphaOutline opacity
xText anchor X coordinate
yText anchor Y coordinate
offsetXHorizontal offset
offsetYVertical offset

Import Settings

To import a saved configuration:

  1. Load a GIF into the editor.
  2. Click Import Settings.
  3. Select the JSON file.
  4. GIF Ops reads the file and parses its contents.
  5. If it contains a frames array, 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.frames

It does not perform comprehensive schema validation of individual settings.

Only import JSON files from sources you trust.

Recommended Workflow

  1. Load the original GIF.
  2. Edit captions and styling.
  3. Export JSON settings.
  4. Render and download the finished GIF.
  5. Retain both the original GIF and the JSON file.

To resume:

  1. Load the original GIF again.
  2. Import the saved JSON settings.
  3. Review each frame.
  4. Continue editing or render again.

JSON File Naming

The current export filename is:

gifhub-settings.json

You 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.


Did this page help you?