Method Image.PSD.__decode()
- Method __decode
 mapping__decode(string|mappingdata)- Description
 Decodes a PSD image to a mapping, defined as follows.
"channels":int(1..24)The number of channels in the image, including any alpha channels.
"height":int(1..30000)The image dimensions.
"width":int(1..30000)"compression":bool1 if the image is compressed, 0 if not.
"depth":int(1..1)|int(8..8)|int(16..16)The number of bits per channel.
"mode":int(0..4)|int(7..9)The color mode of the file.
0Bitmap
1Greyscale
2Indexed
3RGB
4CMYK
7Multichannel
8Duotone
9Lab
"color_data":stringRaw color data.
"image_data":stringRam image data.
"resources":mapping(string|int:mixed)Additional image data. See mappping below.
"layers":array(Layer)An array with the layers of the image. See mapping below.
The resources mapping. Unknown resources will be identified by their ID number (as an int).
"caption":stringImage caption.
"url":stringImage associated URL.
"active_layer":intWhich layer is active.
"guides":array(mapping(string:int))An array with all guides stored in the image file.
"pos":intThe position of the guide.
"vertical":bool1 if the guide is vertical, 0 if it is horizontal.
"resinfo":mapping(string:int)Resolution information
"hres":intFIXME: Document these.
"hres_unit":int"width_unit":int"vres":int"vres_unit":int"height_unit":intThe layer members:
"top":intThe rectangle containing the contents of the layer.
"left":int"right":int"bottom":int"mask_top":intFIXME: Document these
"mask_left":int"mask_right":int"mask_bottom":int"mask_flags":int"opacity":int(8bit)0=transparent, 255=opaque.
"clipping":int0=base, 1=non-base.
"flags":intbit 0=transparency protected bit 1=visible
"mode":stringBlend mode.
"norm"Normal
"dark"Darken
"lite"Lighten
"hue "Hue
"sat "Saturation
"colr"Color
"lum "Luminosity
"mul "Multiply
"scrn"Screen
"diss"Dissolve
"over"Overlay
"hLit"Hard light
"sLit"Soft light
"diff"Difference
"extra_data":stringRaw extra data.
"name":stringThe name of the layer
"channels":array(mapping(string:int|string))The channels of the layer. Each array element is a mapping as follows
"id":intThe ID of the channel
-2User supplied layer mask
-1Transparency mask
0Red
1Green
2Blue
"data":stringThe image data