the pillow package is required to use this function code example Example: install PIL pip install pillow