refactoring, and add function 'setImageBit, clearImageBit'