fix imagexbm output stream bug