From 51991de5e6b04765e2ae22dc558177a9770c49ca Mon Sep 17 00:00:00 2001 From: Jason Antic Date: Thu, 20 Feb 2020 09:04:15 -0800 Subject: [PATCH] oops --- deoldify/visualize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deoldify/visualize.py b/deoldify/visualize.py index 35f0e30..19d6133 100644 --- a/deoldify/visualize.py +++ b/deoldify/visualize.py @@ -27,12 +27,12 @@ def get_watermarked(pil_image: Image) -> Image: (h, w) = image.shape[:2] image = np.dstack([image, np.ones((h, w), dtype="uint8") * 255]) pct = 0.05 - (fwH, fwW) = full_watermark.shape[:2] - wH = int(pct * h) - wW = int((pct * h / fwH) * fwW) full_watermark = cv2.imread( './resource_images/watermark.png', cv2.IMREAD_UNCHANGED ) + (fwH, fwW) = full_watermark.shape[:2] + wH = int(pct * h) + wW = int((pct * h / fwH) * fwW) watermark = cv2.resize(full_watermark, (wH, wW), interpolation=cv2.INTER_AREA) overlay = np.zeros((h, w, 4), dtype="uint8") (wH, wW) = watermark.shape[:2]