fix imgforbase64 some bugs