rewrite bitmap