Method Image.XCF.___decode()


Method ___decode

object ___decode(string|mapping data)

Description

Decodes a XCF image to a mapping.

Structure reference
 
    ([
      "width":int,
      "height":int,
      "type":int,
      "properties":({
        ([
          "type":int,
          "data":string,
        ]),
        ...
      }),
      "layers":({
        ([
          "name":string,
          "width":int,
          "height":int,
          "type":type,
          "properties":({
            ([
              "type":int,
              "data":string,
            ]),
            ...
          }),
          "mask":0 || ([
            "name":string,
            "width":int,
            "height":int,
            "properties":({
              ([
                "type":int,
                "data":string,
              ]),
              ...
            }),
            "image_data":([
              "bpp":int,
              "width":int,
              "height":int,
              "tiles":({
                string,
                ...
              }),
            ]),
          ]),
          "image_data":([
            "bpp":int,
            "width":int,
            "height":int,
            "tiles":({
              string,
              ...
            }),
          ]),
        ]),
        ...
      }),
      "channels":({
        "name":string,
        "width":int,
        "height":int,
        "properties":({
          ([
            "type":int,
            "data":string,
          ]),
          ...
        }),
        "image_data":([
          "bpp":int,
          "width":int,
          "height":int,
          "tiles":({
            string,
            ...
          }),
        ]),
      }),
    ])