write bitmap