Coding binary Images