Skip to content

Commit 6679b1f

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent 2cdb70e commit 6679b1f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

‎supervision/utils/image.py‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def resize_image(
173173
resized_image.size
174174
# (1000, 562)
175175
```
176-
176+
177177
![resize-image](https://media.roboflow.com/supervision-docs/supervision-docs-resize-image-2.png){ align=center width="1000" }
178178
""" # noqa E501 // docs
179179
if keep_aspect_ratio:
@@ -241,7 +241,7 @@ def letterbox_image(
241241
letterboxed_image.size
242242
# (1000, 1000)
243243
```
244-
244+
245245
![letterbox-image](https://media.roboflow.com/supervision-docs/supervision-docs-letterbox-image-2.png){ align=center width="1000" }
246246
""" # noqa E501 // docs
247247
assert isinstance(image, np.ndarray)
@@ -416,12 +416,7 @@ def tint_image(
416416

417417
overlay = np.full_like(image, fill_value=color.as_bgr(), dtype=image.dtype)
418418
cv2.addWeighted(
419-
src1=overlay,
420-
alpha=opacity,
421-
src2=image,
422-
beta=1 - opacity,
423-
gamma=0,
424-
dst=image
419+
src1=overlay, alpha=opacity, src2=image, beta=1 - opacity, gamma=0, dst=image
425420
)
426421
return image
427422

@@ -458,7 +453,7 @@ def grayscale_image(image: ImageType) -> ImageType:
458453
grayscale_image = sv.grayscale_image(image=image)
459454
grayscale_image.save("target.png")
460455
```
461-
456+
462457
![grayscale-image](https://media.roboflow.com/supervision-docs/supervision-docs-grayscale-image-2.png){ align=center width="1000" }
463458
""" # noqa E501 // docs
464459
grayscaled = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

0 commit comments

Comments
 (0)