Write a NumPy program to create a white image of size 512x256.
from PIL import Image import numpy as np a = np.full((512, 256, 3), 255, dtype=np.uint8) image = Image.fromarray(a, "RGB") image.save("white.png", "PNG")
Sample Output:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:

need an explanation for this answer? contact us directly to get an explanation for this answer