MCPcopy Create free account
hub / github.com/Mercury7353/PyBench / is_grayscale

Function is_grayscale

data/unit_test/tests.py:1144–1149  ·  view source on GitHub ↗

检查图像是否是灰度图。

(image_path)

Source from the content-addressed store, hash-verified

1142 assert sharpness_image < sharpness_ref_image, "The sharpness of the image is not lower than the reference image."
1143
1144def is_grayscale(image_path):
1145 """
1146 检查图像是否是灰度图。
1147 """
1148 image = Image.open(image_path)
1149 return image.mode == 'L'
1150
1151def test_task_100(trajectory):
1152 image_path = "./output/100.png"

Callers 1

test_task_100Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected