dividing tuple elements with an int or float

royG roygeorget at gmail.com
Thu Mar 20 02:06:44 EDT 2008


hi
i am trying to resize some images.First i'd read the size as a 2
tuple  and then i want to divide it by 2 or 4 or 2.5 etc..

suppose
origsz=(400,300)
i want to divide the origsize by 2.5 so i can resize to (160,120)

scale=2.5
how can i get the newsz?
obviously origsz/2.5 won't work  ..
thanks
RG



More information about the Python-list mailing list