I want to create an image of individual letters using python/numpy.
Currently I've got the following which works but is probably very inefficient as it needs to save an image everytime.
plt.imshow(np.ones([2, 2, 3]))
plt.gca().axis('off')
plt.text(0, 0, 'hello', color='k', fontsize='18')
plt.gcf().savefig('imtest.png')
imtest = plt.imread('imtest.png') # <- final format I would like to have
I was wondering if you had any suggestions with regards to how I can do this "properly".
I tried to use PIL
but didn't manage to succeed.