Issue #3 open

Image.rotate

Anonymous created an issue

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")

}}}

Comments (3)

  1. Log in to comment