mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 16:19:03 +08:00
Fix: [ALAS] ascreencap returns read-only images
This commit is contained in:
parent
0934746701
commit
3f49aa47ad
@ -170,7 +170,9 @@ class AScreenCap(Connection):
|
||||
# ValueError: cannot reshape array of size 0 into shape (720,1280,4)
|
||||
raise ImageTruncated(str(e))
|
||||
|
||||
cv2.flip(image, 0, dst=image)
|
||||
# flip without `dst=image`
|
||||
# np.frombuffer creates a read-only memory view, we need to create a writable copy here
|
||||
image = cv2.flip(image, 0)
|
||||
if image is None:
|
||||
raise ImageTruncated('Empty image after cv2.flip')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user