Change quotation char usage, remarked code cleanups

This commit is contained in:
Roberto Rosario
2014-06-25 02:22:11 -04:00
parent c4439f45de
commit 0209d13150
6 changed files with 11 additions and 21 deletions

View File

@@ -156,12 +156,13 @@ class ConverterClass(ConverterBase):
# From: http://united-coders.com/christian-harms/image-resizing-tips-general-and-for-python
def resize(self, img, box, fit=False, out=None):
'''Downsample the image.
"""
Downsample the image.
@param img: Image - an Image-object
@param box: tuple(x, y) - the bounding box of the result image
@param fit: boolean - crop the image to fill the box
@param out: file-like-object - save the image into the output stream
'''
"""
# preresize image with factor 2, 4, 8 and fast algorithm
factor = 1
while img.size[0] / factor > 2 * box[0] and img.size[1] * 2 / factor > 2 * box[1]: