Properly calculate ratio

This commit is contained in:
Zeva Rose 2021-06-26 20:38:29 -06:00
parent 8e7ebc940f
commit 9a35051a71

View file

@ -56,7 +56,7 @@ class ImageCog(commands.Cog):
await ctx.send("Image already meets target.") await ctx.send("Image already meets target.")
return return
ratio = size / tgt_size ratio = tgt_size / size
buffer = np.frombuffer(file, dtype=np.uint8) buffer = np.frombuffer(file, dtype=np.uint8)
img = cv2.imdecode(buffer, flags=-1) img = cv2.imdecode(buffer, flags=-1)