layeredimage/io/layered.py
def grabLayer_LAYERED(zipFile: ZipFile, layer: dict[str, Any], blendLookup: dict[str, Any]):
	"""Grab an image from .layered."""
	with zipFile.open("data/" + layer["name"] + ".png") as layerImage:
		image = Image.open(layerImage).convert("RGBA")
	return Layer(
		layer["name"],
		image,
		layer["dimensions"],
		layer["offsets"],
		layer["opacity"],
		layer["visible"],
		blendModeLookup(layer["blendmode"], blendLookup),
	)
Grab an image from .layered.
Grab an image from .layered.
Grab an image from . layered .
def grabLayer_LAYERED(zipFile: ZipFile, layer: dict[str, Any], blendLookup: dict[str, Any]):
	with zipFile.open("data/" + layer["name"] + ".png") as layerImage:
		image = Image.open(layerImage).convert("RGBA")
	return Layer(
		layer["name"],
		image,
		layer["dimensions"],
		layer["offsets"],
		layer["opacity"],
		layer["visible"],
		blendModeLookup(layer["blendmode"], blendLookup),
	)
def grabLayer_LAYERED ( zipFile : ZipFile , layer : dict [ str , Any ] , blendLookup : dict [ str , Any ] ) : with zipFile . open ( "data/" + layer [ "name" ] + ".png" ) as layerImage : image = Image . open ( layerImage ) . convert ( "RGBA" ) return Layer ( layer [ "name" ] , image , layer [ "dimensions" ] , layer [ "offsets" ] , layer [ "opacity" ] , layer [ "visible" ] , blendModeLookup ( layer [ "blendmode" ] , blendLookup ) , )
Grab an image from .layered.
Grab an image from . layered .
"""Grab an image from .layered."""
zipFile
ZipFile
layer
dict[str, Any]
blendLookup
dict[str, Any]