Fix freeze liveview : bloquer surveiller_dslr pendant preview (conflit gphoto2)

This commit is contained in:
2026-04-09 01:38:59 +02:00
parent 94e3d68dd7
commit a59f0ef766
2 changed files with 4 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ import logging
import subprocess
import time
from datetime import datetime
import numpy as np
from pathlib import Path
import cv2
@@ -203,7 +205,7 @@ class Camera:
donnees = bytes(fichier.get_data_and_size())
# Redimensionner pour alléger le WebSocket
img = cv2.imdecode(
__import__("numpy").frombuffer(donnees, dtype=__import__("numpy").uint8),
np.frombuffer(donnees, dtype=np.uint8),
cv2.IMREAD_COLOR,
)
if img is not None: