[chore] Remove White Borders from speedtest Images
This commit is contained in:
parent
c210b51031
commit
e86d0ae027
@ -3,6 +3,7 @@
|
|||||||
import wget
|
import wget
|
||||||
import speedtest
|
import speedtest
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
from program.utils.formatters import bytes
|
from program.utils.formatters import bytes
|
||||||
from driver.filters import command, other_filters
|
from driver.filters import command, other_filters
|
||||||
from driver.decorators import sudo_users_only
|
from driver.decorators import sudo_users_only
|
||||||
@ -31,6 +32,12 @@ async def run_speedtest(_, message: Message):
|
|||||||
return
|
return
|
||||||
m = await m.edit("🔄 sharing speedtest results")
|
m = await m.edit("🔄 sharing speedtest results")
|
||||||
path = wget.download(result["share"])
|
path = wget.download(result["share"])
|
||||||
|
try:
|
||||||
|
img = Image.open(path)
|
||||||
|
c = img.crop((17, 11, 727, 389))
|
||||||
|
c.save(path)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
output = f"""💡 **SpeedTest Results**
|
output = f"""💡 **SpeedTest Results**
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user