Get image size information (see #14).
Add a function to calculate bmp size.
Add guard for the case without progress dialog.