PhotoManager module

Note

Valid image types are: jpg, png, and tiff.

PhotoManager.get_example_img(imgdir)[source]

Gets the path for the first valid image in the given image directory. If theres no valid image in the image directory, then the method returns the path to the default preview image.

Parameters:

imgdir (pathlib.Path) – Path to image directory.

Returns:

path to preview image of image directory

Return type:

pathlib.Path

PhotoManager.get_num_img(imgdir)[source]

Method returns the number of valid images (see above for supported types) in the image directory as an int.

Parameters:

imgdir (pathlib.Path) – Path to image directory.

Returns:

the number of valid images in the directory

Return type:

int