On Fri, 2007-01-05 at 19:27 +0100, Duncan Webb wrote: > You may have noticed that I added the size calculation function to > freevo-1 in util.fileops.py to perform this aspect calculation as the > calculation is quite general purpose and is useful for the webserver > when it opens up the full image and not just the thumbnail. > > Wonder if this would be a useful function for kaa.imlib2?
Seems like a sensible helper function to be in kaa.imlib2. Added. def get_max_rectangle_size((w, h), (max_w, max_h)): """ Returns the aspect-preserved dimensions for the rectangle (w, h) that fit within the maximum rectangle specified by (max_w, max_h). """ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel