Skip to content

Commit

Permalink
Clamp YUV->RGB out of gamut
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Oct 14, 2023
1 parent 8daea7f commit 288bb66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/nodes/impl/color/convert_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def __lch_to_lab(img: np.ndarray) -> np.ndarray:
),
Conversion(
direction=(YUV, RGB),
convert=lambda i: cv2.cvtColor(__rev3(i), cv2.COLOR_YUV2BGR),
convert=lambda i: np.clip(cv2.cvtColor(__rev3(i), cv2.COLOR_YUV2BGR), 0, 1),
cost=__CHROMA_LOST,
),
# HSV/HSL
Expand Down

0 comments on commit 288bb66

Please sign in to comment.