[Zope] Photo: somes issues and thoughts

marc lindahl marc@bowery.com
Fri, 04 Jan 2002 01:54:00 -0500


> From: J M Cerqueira Esteves <jmce@artenumerica.com>

> while Photo uses (with integer division, therefore with truncation
> everywhere):
> 
> if hM > h0 * wM / w0:
> height = h0 * wM / w0
> width = wM
> else:
> height = hM
> width =  w0 * hM / w0


Look at the order of operations - the truncation doesn't hurt anything.