{
  "$defs": {
    "AtlasPage": {
      "additionalProperties": false,
      "description": "One image of the atlas, which holds several.",
      "properties": {
        "height": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "image": {
          "description": "The PNG file of the page, relative to the atlas file.",
          "type": "string"
        },
        "regions": {
          "description": "The images on this page, each one whole on it and none over another.",
          "items": {
            "$ref": "#/$defs/AtlasRegion"
          },
          "type": "array"
        },
        "width": {
          "description": "The size of that image, in pixels.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "image",
        "width",
        "height",
        "regions"
      ],
      "type": "object"
    },
    "AtlasRegion": {
      "additionalProperties": false,
      "description": "Where one image is on its page.",
      "properties": {
        "height": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "description": "The image, as the skeleton names it: in a project, the identifier its attachments give\nit, so that moving or renaming its file leaves the atlas good; in a file of the format\nbefore, which has no identifiers, its `path`.",
          "type": "string"
        },
        "rotated": {
          "description": "The image is on the page turned a quarter clockwise: its own width is `height`, and its\nown top is along the right of the region. Since 0.4.",
          "type": "boolean"
        },
        "trim": {
          "anyOf": [
            {
              "$ref": "#/$defs/Trim"
            },
            {
              "type": "null"
            }
          ],
          "description": "The image was trimmed of the transparent pixels around it: the region holds a part of\nit, which this says. None: the region is the whole image. Since 0.4."
        },
        "width": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "x": {
          "description": "The left of the image on the page, in pixels from its left.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "y": {
          "description": "The top of the image on the page, in pixels from its top.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "name",
        "x",
        "y",
        "width",
        "height"
      ],
      "type": "object"
    },
    "AtlasVersion": {
      "description": "The versions of the atlas format.",
      "oneOf": [
        {
          "const": "0.4",
          "description": "One page or more, each image named as the skeleton names it, by its identifier in a\nproject (that was 0.3), and trimmed of its transparent border or turned a quarter.",
          "type": "string"
        }
      ]
    },
    "Trim": {
      "additionalProperties": false,
      "description": "What of an image a trimmed region holds: the size of the whole image, and where the part\nthat is kept is in it, in pixels from its left and its top, as the image stands (not\nturned).",
      "properties": {
        "height": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "width": {
          "description": "The size of the whole image.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "x": {
          "description": "The left and the top of the part kept.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "y": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height",
        "x",
        "y"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "A pantin atlas: images packed into one page or more.",
  "properties": {
    "format_version": {
      "$ref": "#/$defs/AtlasVersion",
      "description": "The version of the atlas format."
    },
    "pages": {
      "description": "The pages, each with its own image. An image is on one page only.",
      "items": {
        "$ref": "#/$defs/AtlasPage"
      },
      "type": "array"
    }
  },
  "required": [
    "format_version",
    "pages"
  ],
  "title": "pantin atlas, format 0.4",
  "type": "object"
}
