I found the problem.
Because my input array is not np.uint8 so _calc_scale_factor 9 multiply the input array with scale_factor  = 255 one more time.
Solution:
Change the type before feed it to add_image
writer.add_image(tag, images.astype(np.uint8), step, dataformats=dataformats)