From 38294a1fb4451fd97eac9910b9581567299e28f2 Mon Sep 17 00:00:00 2001 From: simonlebeaud Date: Wed, 2 Apr 2025 17:20:42 +0200 Subject: [PATCH] FigureCanvasAgg.tostring_rgb is no longer available use buffer_rgba instead --- src/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.py b/src/util.py index 16dc24a3..02dbd631 100644 --- a/src/util.py +++ b/src/util.py @@ -101,7 +101,7 @@ def draw_handpose(canvas, all_hand_peaks, show_number=False): if show_number: ax.text(x, y, str(i)) bg.draw() - canvas = np.fromstring(bg.tostring_rgb(), dtype='uint8').reshape(int(height), int(width), 3) + canvas = np.asarray(bg.buffer_rgba()) return canvas # image drawed by opencv is not good.