# -*- coding: utf-8 -*-
"""
Created on Sun Sep 29 00:12:06 2019

@author: RUDRAJIT
"""
import numpy as np
from PIL import Image

width=5
height=4

array=np.zeros([height,width,3],dtype=np.uint8)
img=Image.fromarray(array)
img.save("test.png")

array1=np.zeros([100,200,3],dtype=np.uint8)
array1[:,:100]=[255,128,0]#orange
array1[:,100:]=[0,0,255]#blue
img=Image.fromarray(array1)
img.save("test2.png")
be1f9f97eea51823638d2b4e37a5739d6d4c5b42
<mask token>

<mask token>
img.save('test.png')
<mask token>
img.save('test2.png')

<mask token>
width = 5
height = 4
array = np.zeros([height, width, 3], dtype=np.uint8)
img = Image.fromarray(array)
img.save('test.png')
array1 = np.zeros([100, 200, 3], dtype=np.uint8)
array1[:, :100] = [255, 128, 0]
array1[:, 100:] = [0, 0, 255]
img = Image.fromarray(array1)
img.save('test2.png')

<mask token>
import numpy as np
from PIL import Image
width = 5
height = 4
array = np.zeros([height, width, 3], dtype=np.uint8)
img = Image.fromarray(array)
img.save('test.png')
array1 = np.zeros([100, 200, 3], dtype=np.uint8)
array1[:, :100] = [255, 128, 0]
array1[:, 100:] = [0, 0, 255]
img = Image.fromarray(array1)
img.save('test2.png')

# -*- coding: utf-8 -*-
"""
Created on Sun Sep 29 00:12:06 2019

@author: RUDRAJIT
"""
import numpy as np
from PIL import Image

width=5
height=4

array=np.zeros([height,width,3],dtype=np.uint8)
img=Image.fromarray(array)
img.save("test.png")

array1=np.zeros([100,200,3],dtype=np.uint8)
array1[:,:100]=[255,128,0]#orange
array1[:,100:]=[0,0,255]#blue
img=Image.fromarray(array1)
img.save("test2.png")