Skip to content

Commit

Permalink
Renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
hxlnt committed Jan 13, 2019
1 parent 6ab9d75 commit a31fc8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yesme2.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def date(msg):
if msg.sid[:1] == "M" and msg.to == TWILIO_PHONE_NUMBER:
message = client.messages(msg.sid).fetch()
print(message)
break
allimgs = client.messages(message.sid).media.list()
for img in allimgs:
imageuri = (TWILIO_BASE_URI + str(img.uri)).strip(".json'").strip("u'")
Expand All @@ -57,8 +58,8 @@ def date(msg):

# Resize and crop incoming image
originalimage = Image.open(response)
originalimageW = float(img.size[0])
originalimageH = float(img.size[1])
originalimageW = float(originalimage.size[0])
originalimageH = float(originalimage.size[1])
imgRatio = originalimageW/originalimageH
if (imgRatio >= inky_display.HEIGHT/inky_display.WIDTH):
originalimage = originalimage.resize((inky_display.WIDTH, int((1/imgRatio)*inky_display.WIDTH)), resample=Image.BILINEAR)
Expand Down

0 comments on commit a31fc8b

Please sign in to comment.