Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 1.69 KB

File metadata and controls

75 lines (48 loc) · 1.69 KB

Common

Layeredimage Index / Layeredimage / Io / Common

Auto-generated documentation for layeredimage.io.common module.

blendModeLookup

Show source in common.py:15

Get the blendmode from a lookup table.

Signature

def blendModeLookup(
    blendmode: Any,
    blendLookup: dict[Any, Any],
    default: BlendType | tuple[str, ...] = BlendType.NORMAL,
) -> BlendType: ...

expandLayer

Show source in common.py:45

Arguments


foreground (np.ndarray | Image.Image): The foreground layer (must be the same size as the background).

  • opacity float, optional - The opacity of the foreground image. Defaults to 1.0. offsets (Tuple[int, int], optional): Offsets for the foreground layer. Defaults to (0, 0).

Returns


  • Image.Image - The image.

Signature

def expandLayer(
    dimensions: tuple[int, int],
    foreground: np.ndarray | Image.Image,
    opacity: float = 1.0,
    offsets: tuple[int, int] = (0, 0),
) -> Image.Image: ...

expandLayersToCanvas

Show source in common.py:27

Return layers and throw a warning if the image has groups.

Signature

def expandLayersToCanvas(
    layeredImage: LayeredImage, imageFormat: str
) -> list[Image.Image]: ...

See also