Vectorize bitmaps without introducing gaps or overlaps between adjacent regions