take care of background coloring and proper file format when saving

take care of background coloring and proper file format when saving