

# https://www.globalsino.com/ICs/
# numpy pads image edges.

import numpy as np
import matplotlib.pyplot as plt
from matplotlib import image

theFile = r"C:\GlobalSino2\ICs\images2\4304g.png"
outputImage = r"C:\GlobalSino2\ICs\images2\4304bPadC.png"

arr = image.imread(theFile)
# pad_width = ((top, bottom), (left, right))
with_border = np.pad(arr, pad_width=((20, 80), (160, 200), (0,0)))
plt.imshow(with_border)
plt.imsave(outputImage, with_border)
plt.show()
