Method Image.XCF.decode_layers()
- Method decode_layers
array(object) decode_layers(object stringdata)
array(object) decode_layers(object stringdata, object mappingoptions)- Description
-
Decodes a XCF image to an array of Image.Layer objects
The layer object have the following extra variables (to be queried using get_misc_value):
image_xres, image_yres, image_colormap, image_guides, image_parasites, name, parasites, visible, active
Takes the same argument mapping as _decode,
- Method decode_layers
array(Image.Layer) decode_layers(string gimp_image_data, mapping(string:mixed)|void opts)
array(Image.Layer) decode_layers(GimpImage gimp_image, mapping(string:mixed)|void opts)
array(Image.Layer) decode_layers(mapping(string:mixed) gimp_image_chunks, mapping(string:mixed)|void opts)- Description
Decode the image data given as the first argument. If it is a string, it is a gimp image file.
If it is a mapping it is the value you get when calling ___decode()
The options can contain one or more of these options:
"draw_all_layers" : bool If included, all layers will be decoded, even the non-visible ones.
"background" : Image.Color If included, include a solid background layer with the given color
"shrink_fact" : int Shrink the image by a factor of X. Useful for previews.
The layers have a number of extra properties set on them:
"image_xres" : int Values, global to all layers, copied from the GimpImage. Still present in all layers
"image_yres" : int "image_colormap" : Image.Colormap "image_guides" : array(Guide) "image_parasites" : array(Parasite) "name" : string "visible" : bool "active" : bool "tatoo" : int "parasites" : array(Parasite)