PNG
Save and load RGB(A) graphics.
- storylines.png.load(filename)[source]
Load 8-bit PNG image.
- Parameters:
- filenamestr
Name of PNG file to be written.
- Returns:
- list of list of list
8-bit image data of shape (height, width, colors), where colors may be 1 (grayscale), 2 (grayscale and alpha), 3 (RGB), or 4 (RGBA).
- storylines.png.save(filename, image)[source]
Save image as 8-bit PNG without filtering.
Specified at https://www.w3.org/TR/PNG/. Inspired by Blender thumbnailer code.
RGB images with less than 256 colors will be saved using indexed color.
- Parameters:
- filenamestr
Name of PNG file to be written.
- imagelist of list of list
8-bit image data of shape (height, width, colors), where colors may be 1 (grayscale), 2 (grayscale and alpha), 3 (RGB), or 4 (RGBA).