Documentation Archive

Developer

Asset Catalog Format Reference

On This Page

LSR Image Stack

A ZIP container that encapsulates the files and folders defining an image stack.

Extension

.lsr

Folder Contents

The LSR file root level contains folders for each image stack layer and a Contents.JSON file with the attributes for the image stack.

Contents.json File

Metadata, canvas size, and list of image stack layers (Table 33-1).

Table 33-1LSR image stack tags

Key

Type

Description

info

Dictionary

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

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

layers

Array of dictionaries

The layers in the image stack.

   filename

String

The name of the folder containing the layer.

Sample Contents.json Files

Simple Image Stack

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

Image Stack with Canvas Size

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