from flushai import ImageGallery

Initialization

gallery = ImageGallery()

Adding Images

Images can be added with the following:

gallery.add_image(image_path="YOUR_IMAGE_PATH", image_name="MY_IMAGE")

Note the image_name parameter. In this case, it is optional. If it is not specified, it will save the image’s name as what it is found in your file directory.

Deleting Images

Images can be deleted with specifying the name of the image you want to remove:

gallery.remove_image(image_name="MY_IMAGE")

Displaying Images

Images can be displayed either individually or collectively. To display a singular image, we can retrieve it from its particular name:

gallery.display_image(image_name="MY_IMAGE")

We can additionally display all the images at once with the following command:

gallery.display_all()

This will give us an output like this, for example:

Utility Functions