Hi, lazy Peter:
Screenshots on an Ipad are of size 2048x1536 pixel. On my website they have to be a width of 640 px . So it was downloading (email) downloading on PC , changing size , saving and then using a picture., possible but 'time-consuming. So use Pythonista, Peter! Done as follows:
#! python3
import photos as ph
def scshnr(nr):
sc = ph.get_screenshots_album()
img = sc.assets[-nr].get_image() #see minus, telling from last photo
return img
def resizeimg(nw, von, bis):
"""
resize photos from: von until: bis
new width = nw
"""
for i in range(von, bis + 1):
img = scshnr(i)
W = img.width
H = img.height
#print((W,H))
hdw = round(1.0 * nw/ W, 3)
#print(hdw)
nh = int(H * hdw)
#print(nh)
res = img.resize((nw,nh))
#res.show()
ph.save_image(res)
resizeimg(640, 1, 1) #resize to widht 640 (from 1 to 1 : means only the last img)
print('OK') #message in the Console
Pleas suggest a better way to show the code, if it does not show indented here ;-)
Peter