~ubuntu-branches/ubuntu/quantal/lazygal/quantal

« back to all changes in this revision

Viewing changes to lazygal/eyecandy.py

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2011-05-02 09:38:33 UTC
  • mfrom: (1.1.7 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110502093833-9g9ua4xmag1q1oec
Tags: 0.6.1-1
* New upstream release.
* Bump standards to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    STEP = 5
32
32
    THUMB_HOW_MANY = 5
33
33
    THUMB_MAX_ROTATE_ANGLE = 40
34
 
    THUMB_SIZE = [3*max(RESULT_SIZE)/5 for i in range(2)]
 
34
    THUMB_SIZE = [3*max(RESULT_SIZE)//5 for i in range(2)]
35
35
    THUMB_WHITE_WIDTH = 5
36
36
 
37
37
    def __init__(self, images_paths, top_image_path=None, bg='transparent'):
66
66
 
67
67
        thumb = Image.new('RGBA', (maxi, maxi))
68
68
 
69
 
        thumb.paste(white, ((maxi - white_size[0])/ 2,
70
 
                            (maxi - white_size[1])/ 2))
 
69
        thumb.paste(white, ((maxi - white_size[0])// 2,
 
70
                            (maxi - white_size[1])// 2))
71
71
 
72
72
        rotation = random.randint(-self.THUMB_MAX_ROTATE_ANGLE,
73
73
                                  self.THUMB_MAX_ROTATE_ANGLE)