MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / impatch

Function impatch

src/depthmap_generation.py:663–670  ·  view source on GitHub ↗
(image, rect)

Source from the content-addressed store, hash-verified

661
662
663def impatch(image, rect):
664 # Extract the given patch pixels from a given image.
665 w1 = rect[0]
666 h1 = rect[1]
667 w2 = w1 + rect[2]
668 h2 = h1 + rect[3]
669 image_patch = image[h1:h2, w1:w2]
670 return image_patch
671
672
673class ImageandPatchs:

Callers 1

__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected