diff --git a/file.py b/file.py index e478490..11c0bf6 100644 --- a/file.py +++ b/file.py @@ -74,7 +74,7 @@ def thumbnail(input, minSize: int = 600): if height < width: newshape = (int(minSize / width * height), minSize) else: - newshape = (minSize, int(minSize / width * height)) + newshape = (minSize, int(minSize / height * width)) img = cv2.resize(img, newshape) success, encoded_image = cv2.imencode(".webp", img, [cv2.IMWRITE_WEBP_QUALITY, 75]) return encoded_image.tobytes() diff --git a/requirements.txt b/requirements.txt index b7a17c1..fc6c551 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ shortuuid flask -opencv-python \ No newline at end of file +opencv-python +opencv-python-headless \ No newline at end of file diff --git a/templates/view.html b/templates/view.html index 7b0a733..bcd79c1 100644 --- a/templates/view.html +++ b/templates/view.html @@ -28,7 +28,7 @@ img { display: block; width: 100%; - min-height: 300px; + min-height: 200px; margin-top: 10px; }