From 14a0d4b54ae2e808d8d9992a992affb0a35fdf1c Mon Sep 17 00:00:00 2001 From: march3 Date: Sun, 26 Mar 2023 20:09:32 +0800 Subject: [PATCH] =?UTF-8?q?Python=E8=B6=85=E4=BA=BA-=E5=AE=87=E5=AE=99?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sim_scenes/interest/utils/body_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim_scenes/interest/utils/body_utils.py b/sim_scenes/interest/utils/body_utils.py index a296ce1..1a7533a 100644 --- a/sim_scenes/interest/utils/body_utils.py +++ b/sim_scenes/interest/utils/body_utils.py @@ -44,7 +44,7 @@ def gen_bodies_from_image(pixel_image, params, body_template=None): # 对于纯白色的颜色,就忽略,不生成星球(这样图片中,纯白色越多,对电脑的压力就越小) if pixel[0] >= 255 and pixel[1] >= 255 and pixel[1] >= 255: continue - body_str = body_template % (f"星球{h}:{w}", pixel[0], pixel[1], pixel[2], scale, + body_str = body_template % (f"星球{w}:{h}", pixel[0], pixel[1], pixel[2], scale, (width - w) * interval_factor, (height - h) * interval_factor, scale) bodies_str += body_str + ",\n" -- GitLab