Save image into file.

Signed-off-by: Yuriy Rusinov <yrusinov@gmail.com>