Difference between image encoding of tensorflow and traditional encoding

Skip to first unread message

rohan mahajan

Apr 18, 2022, 9:25:27 AM4/18/22
to Discuss
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.

Reply all
Reply to author
0 new messages