タグ

ブックマーク / www.riisen.dk (1)

  • Python Image Library

    Python Image Library - Examples import Image global ext ext = ".jpg" imageFile = "test.jpg" im1 = Image.open(imageFile) Original image Resize def imgResize(im): div = 2 width = im.size[0] / div height = im.size[1] / div im2 = im.resize((width, height), Image.NEAREST) # use nearest neighbour im3 = im.resize((width, height), Image.BILINEAR) # linear interpolation in a 2x2 environment im4 = im.resize

  • 1