I am using the Python 2 script [LINK] to create an image atlas with a gradient for volume rendering. I followed this [LINK] to migrate the code to Python 3 and was successful in doing so. But when I try to run the script, there was an error (cannot write mode F as PNG) with saving the image array in PNG format.