Python Forum
Simple longline function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple longline function
#1
Please guys don't tell me that I must use the save to path and load from path

def reduce_image_size(dmy):
    with open('MyTempImage.jpg', 'wb') as f:
        f.write(dmy)
    f.close()
    image =Image.open('MyTempImage.jpg')
    image.save('MyTempImageOUT.jpg',quality=20,optimize=True)
    with open('MyTempImageOUT.jpg', "rb") as rawimg:
        return rawimg
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020