Tips / Examples of sending an image file (jpeg, png) through socket programming?

I heard that we can somehow send an image file with binary code through a socket ... But I have no idea how to convert an image file to a binary file or even think about transferring it over a socket ...

Was she hoping anyone could post a simple example? or point me in the right direction :) I also use QT only for my gui, but not using QT socket programming.

Thanks a lot: D I really appreciate it


Question by @ djc:

How do you get the directory path for the image and somehow use the send command on that image? I mainly use C ++. But this is also a question that I had for a while.

+3
source share
2 answers

All image files that you already have are already binary. You can simply send them through a socket.

+2
source

You will need to find out or indicate to the user the path that will find the image file.

, , , , ( , , ). , , - , , - ( , ). , ( ), , , , , , . stat() POSIX. , , ( - , " " "" ) ( 16- , 65535 ), " " . , , ; , , .

0

Source: https://habr.com/ru/post/1724212/


All Articles