jpeg - jpg file difference : from wireshark tcp stream and from a C++ socket -
jpeg - jpg file difference : from wireshark tcp stream and from a C++ socket -
i'm trying record jpeg image sent ethernet photographic camera in mjpg stream. image obtain borland c++ application (vspcip) looks identical in notepad++ tcp stream saved application wireshark (except number of characters : 15540 in file, , 15342 in wireshark file, whereas jpeg content-length announced 15342). have 198 non-displayable characters more expected both files have 247 lines.
here 2 files : http://demo.ovh.com/fr/a61295d39f963998ba1244da2f55a27d/
which tool utilize (in notepad++ (i tried display in utf8 or ansi : files still match whereas don't have same number of characters) or editor) view non-displayable characters ?
std::ofstream default opens file in text mode, means might translate newline characters ('\n' binary 0x0a) carriage-return/newline sequence ("\r\n", binary 0x0d , 0x0a).
open output file in binary mode , solve problem:
std::ofstream os("filename", ios_base::out | ios_base::binary); tcp jpeg wireshark mjpeg content-length
Comments
Post a Comment