I would like to send a .gif file over a serial port connection using C in Linux.
I know how to send bytes over the connection and receive them on the other hand, but have no real idea how to do it with a .gif file.
How can I send the image byte per byte over the connection and reconstruct it on the other end?
Thanks.
Sending a gif is no different than sending any other sequence of bytes. As long as you’re not using a file mode that tries to translate carriage returns and/or line feeds like some non-binary connections do, you just read the file in and send the contents, and on the other end read them off the connection and write them to a file.