Preserve alpha channel during resize
This commit is contained in:
parent
a3551dd02b
commit
8e7ebc940f
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ class ImageCog(commands.Cog):
|
|||
ratio = size / tgt_size
|
||||
|
||||
buffer = np.frombuffer(file, dtype=np.uint8)
|
||||
img = cv2.imdecode(buffer, flags=1)
|
||||
img = cv2.imdecode(buffer, flags=-1)
|
||||
|
||||
width = int(img.shape[1] * ratio)
|
||||
height = int(img.shape[0] * ratio)
|
||||
|
|
Loading…
Add table
Reference in a new issue