/trim-resize-image

trim-resize-image trims white space from an image and resize with specified size.

Primary LanguagePython

trim-resize-image

trim-resize-image trims white space from an image and resize with specified size.

Requirements

  • python 3.6
  • Pillow

Usage

you can just clone this repo and use like below.

$python trim-resize-image.py --img_dir='directory that has images to be trimed' --result_dir='directory that includes images' --width=width --height=height --border='white space around result images'

Example & Screenshot

$python trim-resize-image.py --img_dir=idea --result_dir=idea_trim --width=216 --height=216 --border=20

screenshot1