Finally fixed saving the resulting bitmap