from PIL import Image
import sys
from io import BytesIO
+from pathlib import Path
+
HOST = "192.168.0.106"
PORT = 2345
elapsed_time += time.time() - t
-print("time in memory bmp",elapsed_time/nb_times)
+print("compute bmp",elapsed_time/nb_times," / size of file ",Path('lena.bmp').stat().st_size)
"""
elapsed_time += time.time() - t
-print("time noscale jpg",elapsed_time/nb_times)
+print("compute noscale jpg",elapsed_time/nb_times, " / size of file ",Path('lena2.jpg').stat().st_size)
im2.save(buf, "JPEG", quality=quality)
elapsed_time += time.time() - t
-print("time resize + pil",elapsed_time/nb_times)
+print("compute scale jpg ",elapsed_time/nb_times, " / size of file ",Path('lena3.jpg').stat().st_size)
sbuf.put_bytes(f.read())
# print('File Sent')
elapsed_time += time.time() - t
- print("send lena.bmp ",elapsed_time/nb_times)
+ print("send bmp ",elapsed_time/nb_times)
elapsed_time=0
t=time.time()
sbuf.put_bytes(f.read())
# print('File Sent')
elapsed_time += time.time() - t
- print("send noscale lena2.jpg ",elapsed_time/nb_times)
+ print("send noscale jpg ",elapsed_time/nb_times)
elapsed_time=0
t=time.time()
sbuf.put_bytes(f.read())
# print('File Sent')
elapsed_time += time.time() - t
- print("send scale lena3.jpg ",elapsed_time/nb_times)
+ print("send scale jpg ",elapsed_time/nb_times)