eliminates variable defination, change to extern
add global variable definations
build pic from bmp failed, need to be repaired