I am stuck with a problem.
I want to convert many greyscale images to RGBA with my dictionary palette where greyScale value = (r,g,b) (adding transparency 0 where the pixel is 0).
I wrote some code but it takes ~0.3sec to end one transformation.
Is there some faster way to get better performance?
Thanks <3


The performance depends on your image resolution. But you can use Numpy like this for the case.