如何在没有 Photoshop 的情况下创建 tvOS 图标

How to create a tvOS icon without Photoshop

阅读 Apple 文档,似乎必须使用 Photoshop CC 2014 或 2015 为 tvOS 商店的图标和图像创建视差。是否可以使用其他工具或者我们被迫使用 Photoshop?

您现在被迫使用 photoshop。当然,这个 lsr 元数据并没有那么难。

您可以尝试自己生成 .lsr,(请注意,这非常痛苦)

在根目录下创建一个json文件:

//Contents.json
{
      "layers": [
        {
          "filename": "top-layer.imagestacklayer"
        },
        {
          "filename": "highlight-layer.imagestacklayer"
        },
        {
          "filename": "shadow-layer.imagestacklayer"
        },
        {
          "filename": "middle-layer.imagestacklayer"
        },
        {
          "filename": "back-layer.imagestacklayer"
        }
      ],
      "info": {
        "version": 1,
        "author": "photoshop lsr plugin 1.1"
      },
      "properties": {
        "canvasSize": {
          "width": 400,
          "height": 240
        }
      }
    }

每个 "filename" 值,为每个值创建一个目录。 在每个目录中创建另一个 JSON 文件:

//Contents.json
    {
      "info": {
        "version": 1,
        "author": "photoshop lsr plugin 1.1"
      },
      "properties": {
        "frame-size": {
          "width": 400,
          "height": 240
        },
        "frame-center": {
          "x": 200,
          "y": 120
        }
      }
    }

还在其中嵌套一个名为 Content.imageset

的新目录

在此新目录中执行另一个 json 文件:

//Contents.json
{
  "info": {
    "version": 1,
    "author": "photoshop lsr plugin 1.1"
  },
  "images": [
    {
      "idiom": "universal",
      "filename": "back-layer.png",
      "scale": "1x"
    }
  ]
}

在此目录中也包含 .png

所以它应该看起来像这样:

最后但同样重要的是,使用 .zip 压缩并将文件扩展名更改为 .lsr

如果您转到看到 Parallax Exporter 的同一 page on the Apple Developer site,您还会看到 Parallax Previewer 的下载。其描述为,

If you don’t use Adobe Photoshop, you can also use Parallax Previewer to assemble the individual layers and export a layered image.

Parallax Exporter 只是为使用 Photoshop 的人提供的便利,而不是制作分层图标的唯一方法。

您根本不需要处理.lsr 文件。你只需要为每一层都有单独的 PNG 文件,并在资产文件中用它们构建 "App Icon - Small"。 Xcode 甚至可以为您提供漂亮的视差预览。

因此,您根本不需要使用 PhotoShop。任何可以处理 PNG 文件的应用程序(甚至 OSX 的预览应用程序)都足够了。