From d0022f51978acc4d08b69dd972b5b05e008dd630 Mon Sep 17 00:00:00 2001 From: yuji38kwmt Date: Thu, 12 Mar 2026 12:49:08 +0900 Subject: [PATCH] =?UTF-8?q?`write=5Fbinary=5Fimage`=20:=20RGBA=E3=83=A2?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=AE=E6=8C=87=E5=AE=9A=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=97=E3=80=81=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=88=E3=83=A2=E3=83=BC=E3=83=89=E3=81=A7=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=82=92=E4=BF=9D=E5=AD=98=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annofabapi/segmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/annofabapi/segmentation.py b/annofabapi/segmentation.py index b7bd0164..9750f1cb 100644 --- a/annofabapi/segmentation.py +++ b/annofabapi/segmentation.py @@ -33,4 +33,4 @@ def write_binary_image(array: npt.ArrayLike, fp) -> None: # noqa: ANN001 channel = 4 # RGBAの4チャンネル data = numpy.zeros((height, width, channel), dtype=numpy.uint8) data[mask_array] = [255, 255, 255, 255] - Image.fromarray(data, mode="RGBA").save(fp, format="PNG") + Image.fromarray(data).save(fp, format="PNG")