2022-01-31

Pillow(PIL)

【Python/Pillow(PIL)】画像の上下左右反転、90°ごとの回転

Pillowで画像(画像データ)を画像の上下左右反転、90°ごとの回転をさせるには、Imageクラスのtransposeメソッドを用います。 これとは別にImageOpsモジュールのmirror関数(左右反転)とflip関数(上下反転)があ...
Pillow(PIL)

【Python/Pillow(PIL)】画像の回転

Pillowで画像(画像データ)を拡大/縮小するには、Imageクラスのrotateメソッドを用います。 構文 Image.rotate(angle, resample=0, expand=0, center=None, translate...