Discarding alpha channel from images stored as Numpy arrays Discarding alpha channel from images stored as Numpy arrays numpy numpy

Discarding alpha channel from images stored as Numpy arrays


Just slice the array to get the first three entries of the last dimension:

image_without_alpha = image[:,:,:3]