disk_operations
Disk
Bases: DiskInterface
Save or load images to and from the disk.
Source code in src/artificial_artwork/disk_operations.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
load_image(file_path)
staticmethod
Load an image as numpy ndarray from a file on the disk.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path |
str
|
the path (on the disk) of the file |
required |
Returns:
Name | Type | Description |
---|---|---|
NDArray |
NDArray
|
the image as numpy ndarray |
Source code in src/artificial_artwork/disk_operations.py
20 21 22 23 24 25 26 27 28 29 30 |
|
save_image(image, file_path, save_format=None)
staticmethod
Save a numpy ndarray into a file on the disk.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
NDArray
|
the image to save into a file |
required |
file_path |
str
|
the path (on the disk) of the file |
required |
Source code in src/artificial_artwork/disk_operations.py
10 11 12 13 14 15 16 17 18 |
|