I am trying to write a tensor to a png. As seen here, when I take the encoded bytes and write it a file using python, it doesn't work. Trying opening the image it gets corrupted
When I use tf.io.write_file it works. I also tried taking a png and using tf.io_decode_png and than tf.io.encoding_png and the image string bytes differ from the original png. I am using tensorflow serving and using this png result through the rest api, where I don't have access to tf.io.wrte_file so I was wondering what encode_png does differently, than traditional png encodings.