Fredrik Lundh is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

effbot / pil-2009-raclette http://effbot.org/zone/pil-index.htm

Work repository for PIL 1.1.7 and beyond. The "default" branch should be fairly solid, the other branches less so. For production use, see the pil-117 repository.

Clone this repository (size: 1.6 MB): HTTPS / SSH
hg clone https://bitbucket.org/effbot/pil-2009-raclette
hg clone ssh://hg@bitbucket.org/effbot/pil-2009-raclette

Issues

#3 Image.rotate

Reported anonymously

Using Image.rotate, I found that it didn't do what I expected from it particularly with n*90 angles (and I don't think it's supposed to work this way either :) ) The image got shifted, part of it being cropped, black background being revealed and dimension is slightly modified. Transpose does work though. Here is test script showing issue :

#!/usr/bin/env python

import Image, ImageDraw

#im = Image.new("L", (928, 151), 128)
im = Image.new("L", (928, 140), 128)

draw = ImageDraw.Draw(im)
draw.rectangle([0,0,im.size[0]-1,im.size[1]-1], outline=255, fill=128)
del draw
im.save("im_orig.png")

rotated = im.rotate(180, resample=Image.BICUBIC, expand=1)
rotated.save("im_rotated.png")

transposed = im.transpose(Image.ROTATE_180)
transposed.save("im_transposed.png")

Status: open Responsible: Fredrik Lundh Type: bug Priority: major
Milestone: raclette-post Component: none Version: pil-1.1.6

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Fredrik Lundh

    written

    • Changed status from new to open.
    • Changed responsible from nobody to effbot.
    • Changed milestone from raclette-alpha to raclette-post.
  2. #2 Anonymous

    written

    Bump!

  3. #3 Anonymous

    written

    Bump!

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?