Documentation Archive

Developer

Asset Catalog Format Reference

On This Page

Image Stack Type

A set of layered images combined to enable parallax. For more information on layered images and parallax, see Creating Parallax Artwork in the App Programming Guide for tvOS and Layered Images in the Apple TV Human Interface Guidelines.

Extension

.imagestack

Folder Contents

Image stack layers.

Contents.json File (Required)

Metadata and a list of the image stack layers (Table 19-1).

Table 19-1Image stack tags

Key

Type

Description

info

Dictionary

Metadata for the author and format version of the asset catalog.

   author

String

Use your bundle ID.

   version

Number

The format version of the asset catalog. Use 1.

layers

Array of dictionaries

The layers in the image stack.

   filename

String

The name of the asset catalog folder containing the layer.

properties

Dictionary

Properties for the image stack.

   canvasSize

Dictionary

The canvas size for the image stack.

Defaults to the size of the background layer if the tag is not included.

      width

Number

The width of the image stack canvas in pixels.

      height

Number

The height of the image stack canvas in pixels.

Sample Contents.json Files

Simple Image Stack

  1. {
  2. "layers" : [
  3. {
  4. "filename" : "Foreground.imagestacklayer"
  5. },
  6. {
  7. "filename" : "Llama.imagestacklayer"
  8. },
  9. {
  10. "filename" : "Background.imagestacklayer"
  11. }
  12. ],
  13.   "info" : {
  14.       "author" : "com.developerName",
  15.       "version" : 1
  16.    }
  17. }

Image Stack with Canvas Size

  1. {
  2. "layers" : [
  3. {
  4. "filename" : "Foreground.imagestacklayer"
  5. },
  6. {
  7. "filename" : "Llama.imagestacklayer"
  8. },
  9. {
  10. "filename" : "Background.imagestacklayer"
  11. }
  12. ],
  13.   "info" : {
  14.       "author" : "com.developerName",
  15.       "version" : 1
  16.    },
  17.   "properties" : {
  18.       "canvasSize" : {
  19.          "width" : 2048
  20.          "height" : 1365
  21.       }
  22.    }
  23. }