add function converting bitmap to file