MCPcopy Create free account
hub / github.com/MearaY/StegaPy / pixel_range

Method pixel_range

StegaPy/util/image_util.py:198–200  ·  view source on GitHub ↗

将像素值限制在0-255范围内

(value)

Source from the content-addressed store, hash-verified

196
197 @staticmethod
198 def pixel_range(value):
199 """将像素值限制在0-255范围内"""
200 return max(0, min(255, int(value)))
201

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected