LoginSignup
1
3

More than 5 years have passed since last update.

pillow

Last updated at Posted at 2016-02-10

使い方

Pillow 3.1.1

基本

from PIL import Image as img
im = im.open("{file}")

情報確認

im.size # (xx,xx)

結合(?)

複数の画像を1枚にする
画像読込み→新キャンパス→位置指定貼付け

a_jpg = im.open("{image_a}") # size(100,100)
b_jpg = im.open("{image_b}") # size(100,100)

canvas = im.new("RGB",(xxx,xxx),(255,255,255))

canvas.paste(a_jpg,(0,0))
canvas.paste(a_jpg,(0,100))
canvas.save('c.jpg', 'JPEG', quality=100, optimize=True)

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3