Logo Search packages:      
Sourcecode: zope-photo version File versions  Download package

def zope-photo-1.2.4::Photo::Photo::_getAspectRatioSize (   self,
  width,
  height 
) [private]

Return proportional dimensions within desired size.

Definition at line 411 of file Photo.py.

00411                                                 :
        """Return proportional dimensions within desired size."""
        img_width, img_height = self.width(), self.height()
        sw = float(width) / img_width
        sh = float(height) / img_height
        if sw <= sh:
            height = int(sw * img_height + 0.5)
        else:
            width = int(sh * img_width + 0.5)
        return (width, height)
                                                                                
    def _validImage(self):


Generated by  Doxygen 1.6.0   Back to index