Listing 2. Simple Geometry Transforms out = im.resize((128, 128)) out = im.rotate(45) out = im.transpose(Image.ROTATE_90)