Documentation Archive

Developer

Asset Catalog Format Reference

On This Page

LSR Image Stack Layer

A layer in an image stack.

Extension

.imagestacklayer

Folder Contents

A Contents.json file and an image set for the layer.

Contents.json File

Metadata and optional size and centering information for the layer (Table 34-1).

Table 34-1LSR image stack layer tags

Key

Type

Description

info

Dictionary

Metadata for the author and format version of the image stack layer.

   author

String

Use your bundle ID.

LSR files generated by Xcode use xcode.

   version

Number

The format version of the LSR file. Use 1.

properties

Dictionary

Properties for an image stack layer.

   frame-size

Dictionary

The size for the image stack layer.

Defaults to the size of the image stack canvas if the tag is not included.

      width

Number

The width of the image stack layer in pixels.

      height

Number

The height of the image stack layer in pixels.

   frame-center

Dictionary

The position of the center of the image stack layer image on the image stack canvas.

Defaults to the center of the image stack canvas if the tag is not included.

The coordinate is in pixels from the top-left edge of the image stack canvas.

      x

Number

The horizontal position of the center of the image stack layer.

      y

Number

The vertical position of the image stack layer.

Sample Contents.json Files

Simple Image Stack Layer

  1. {
  2.   "info" : {
  3.       "author" : "com.developerName",
  4.       "version" : 1
  5.    },
  6. }

Image Stack Layer with Size and Center

  1. {
  2.   "info" : {
  3.       "author" : "com.developerName",
  4.       "version" : 1
  5.    },
  6.   "properties" : {
  7. "frame-size : {
  8.          "width" : 364,
  9.          "height" : 548
  10.       },
  11. "frame-center : {
  12.          "x" : 1500,
  13.          "y" : 700
  14.       }
  15.    }
  16. }