layeredimage/io/common.py
def expandLayersToCanvas(layeredImage: LayeredImage, imageFormat: str) -> list[Image]:
	"""Return layers and throw a warning if the image has groups."""
	if len(layeredImage.extractGroups()) > 0:
		Logger(FHFormatter()).logPrint(
			imageFormat + "s do not " "support groups so extracting layers", LogType.WARNING
		)
	layers = []
	for layer in layeredImage.extractLayers():
		layers.append(
			renderWAlphaOffset(layer.image, layeredImage.dimensions, layer.opacity, layer.offsets)
		)
	return layers
Return layers and throw a warning if the image has groups.
Return layers and throw a warning if the image has groups.
Return layers and throw a warning if the image has groups .
def expandLayersToCanvas(layeredImage: LayeredImage, imageFormat: str) -> list[Image]:
	if len(layeredImage.extractGroups()) > 0:
		Logger(FHFormatter()).logPrint(
			imageFormat + "s do not " "support groups so extracting layers", LogType.WARNING
		)
	layers = []
	for layer in layeredImage.extractLayers():
		layers.append(
			renderWAlphaOffset(layer.image, layeredImage.dimensions, layer.opacity, layer.offsets)
		)
	return layers
def expandLayersToCanvas ( layeredImage : LayeredImage , imageFormat : str ) -> list [ Image ] : if len ( layeredImage . extractGroups ( ) ) > 0 : Logger ( FHFormatter ( ) ) . logPrint ( imageFormat + "s do not " "support groups so extracting layers" , LogType . WARNING ) layers = [ ] for layer in layeredImage . extractLayers ( ) : layers . append ( renderWAlphaOffset ( layer . image , layeredImage . dimensions , layer . opacity , layer . offsets ) ) return layers
Return layers and throw a warning if the image has groups.
Return layers and throw a warning if the image has groups .
"""Return layers and throw a warning if the image has groups."""
layeredImage
LayeredImage
imageFormat
str