.org/10.1126/%5c%22http:/dx.doi.org/10.1126/%5c%22http:/dx.doi.org/10.1016/j.actbio.2005.06.006%5c%22?lang=de-DE">Deutsch Français Nederlands Latviešu Русский 日本語 Español Português do Brasil Polski български Italiano Website Go1.5.1 kodo - Gogs: Go Git Service

Brak opisu

thumbnail_utils.py 532B

    # -*- coding: utf-8 -*- from __future__ import division try: from PIL import Image except ImportError: import Image def make_thumbnail(im_path, im_thumbnail_path=None, max_width=360): im = Image.open(im_path) width, height = im.size thumb_width = min(max_width, width) thumb_height = height / width * thumb_width im.thumbnail((thumb_width, thumb_height), Image.ANTIALIAS) im.save(im_thumbnail_path or im_path, im.format or 'JPEG', quality=90) return width, height, thumb_width, thumb_height