Add support for resizing.

Signed-off-by: darkestkhan <darkestkhan@gmail.com>