rename tostring_argb to tostring_rgb

This commit is contained in:
Fangjun Kuang 2025-01-02 10:12:33 +08:00
parent bce18ed564
commit 7f1e2695f2

View File

@ -113,7 +113,7 @@ def plot_feature(spectrogram):
plt.tight_layout()
fig.canvas.draw()
data = np.fromstring(fig.canvas.tostring_argb(), dtype=np.uint8, sep="")
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep="")
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
plt.close()
return data