Images
- class lib.gui.utils.image.Images
Bases:
objectThe centralized image repository for holding all icons and images required by the GUI.
This class should be initialized on GUI startup through
initialize_images(). Any further access to this class should be throughget_images().Attributes Summary
The faceswap icons for all parts of the GUI.
PreviewTrainThe object handling the training preview imagesPreviewTrainThe object handling the training preview imagesMethods Summary
Delete the preview files in the cache folder and reset the image cache.
Attributes Documentation
- icons
The faceswap icons for all parts of the GUI. The dictionary key is the icon name (str) the value is the icon sized and formatted for display (
PIL.ImageTK.PhotoImage).Example
>>> icons = get_images().icons >>> save = icons["save"] >>> button = ttk.Button(parent, image=save) >>> button.pack()
- Type:
dict
- preview_extract
PreviewTrainThe object handling the training preview images
- preview_train
PreviewTrainThe object handling the training preview images
Methods Documentation
- delete_preview() None
Delete the preview files in the cache folder and reset the image cache.
Should be called when terminating tasks, or when Faceswap starts up or shuts down.
- Return type:
None
- delete_preview() None
Delete the preview files in the cache folder and reset the image cache.
Should be called when terminating tasks, or when Faceswap starts up or shuts down.
- Return type:
None
- property icons: dict[str, PhotoImage]
The faceswap icons for all parts of the GUI. The dictionary key is the icon name (str) the value is the icon sized and formatted for display (
PIL.ImageTK.PhotoImage).Example
>>> icons = get_images().icons >>> save = icons["save"] >>> button = ttk.Button(parent, image=save) >>> button.pack()
- Type:
dict
- property preview_extract: PreviewExtract
PreviewTrainThe object handling the training preview images
- property preview_train: PreviewTrain
PreviewTrainThe object handling the training preview images