Glad to help!
First, please let me say that two things are required to produce an image. #1, you need a capture that starts at the exact beginning of a file & ends at the exact end of a file. #2, you need to have ALL of the packets (in the correct order) with none missing.
Of course, neither of these things will happen ‘live’ in a single capture ( by one station alone ) unless you are extremely lucky!
So, before using my script (or any tool) to convert the decoded packets to a JPG image file, it’s essential to find the beginning bytes ( FFD8FFE0 ) & end bytes ( FFD9 ) of the file, then use the index numbers ( RS: 0, RS: 1, etc. ) within each packet to verify whether or not you’re missing any.
I did this by hand, but of course someone with programming skills could automate the process.
So, to finally answer your question, here is a portion of my direwolf decode that happens to contain the first packet of a RamSat JPG image file:
[2021-08-20 18:29:47] CQ audio level = 36(+30/-29) [NONE] _:||||||_
[2021-08-20 18:29:47] [0.4] CQ>W4SKH:RS: 0 FFD8FFE000104A46494600010101000000000000FFDB0043000C08090B09080C0B0A0B0E0D0C0E121E1412111112251A1C161E2C262E2D2B262A293036453B30334134292A3C523D41474A4D4E4D2F3A555B544B5A454C4D4AFFDB0043010D0E0E121012231414234A322A324A4A4A4A4A4A4A4A4A4A4A4A
[2021-08-20 18:29:47] ------
[2021-08-20 18:29:47] U frame UI: p/f=0, No layer 3 protocol implemented., length = 265
[2021-08-20 18:29:47] dest W4SKH 0 c/r=0 res=3 last=0
[2021-08-20 18:29:47] source CQ 0 c/r=1 res=3 last=1
[2021-08-20 18:29:47] 000: ae 68 a6 96 90 40 60 86 a2 40 40 40 40 e1 03 f0 .h...@`..@@@@...
[2021-08-20 18:29:47] 010: 52 53 3a 20 20 20 20 30 20 46 46 44 38 46 46 45 RS: 0 FFD8FFE
[2021-08-20 18:29:47] 020: 30 30 30 31 30 34 41 34 36 34 39 34 36 30 30 30 000104A464946000
[2021-08-20 18:29:47] 030: 31 30 31 30 31 30 30 30 30 30 30 30 30 30 30 30 1010100000000000
[2021-08-20 18:29:47] 040: 30 46 46 44 42 30 30 34 33 30 30 30 43 30 38 30 0FFDB0043000C080
[2021-08-20 18:29:47] 050: 39 30 42 30 39 30 38 30 43 30 42 30 41 30 42 30 90B09080C0B0A0B0
[2021-08-20 18:29:47] 060: 45 30 44 30 43 30 45 31 32 31 45 31 34 31 32 31 E0D0C0E121E14121
[2021-08-20 18:29:47] 070: 31 31 31 31 32 32 35 31 41 31 43 31 36 31 45 32 11112251A1C161E2
[2021-08-20 18:29:47] 080: 43 32 36 32 45 32 44 32 42 32 36 32 41 32 39 33 C262E2D2B262A293
[2021-08-20 18:29:47] 090: 30 33 36 34 35 33 42 33 30 33 33 34 31 33 34 32 036453B303341342
[2021-08-20 18:29:47] 0a0: 39 32 41 33 43 35 32 33 44 34 31 34 37 34 41 34 92A3C523D41474A4
[2021-08-20 18:29:47] 0b0: 44 34 45 34 44 32 46 33 41 35 35 35 42 35 34 34 D4E4D2F3A555B544
[2021-08-20 18:29:47] 0c0: 42 35 41 34 35 34 43 34 44 34 41 46 46 44 42 30 B5A454C4D4AFFDB0
[2021-08-20 18:29:47] 0d0: 30 34 33 30 31 30 44 30 45 30 45 31 32 31 30 31 043010D0E0E12101
[2021-08-20 18:29:47] 0e0: 32 32 33 31 34 31 34 32 33 34 41 33 32 32 41 33 2231414234A322A3
[2021-08-20 18:29:47] 0f0: 32 34 41 34 41 34 41 34 41 34 41 34 41 34 41 34 24A4A4A4A4A4A4A4
[2021-08-20 18:29:47] 100: 41 34 41 34 41 34 41 34 41 A4A4A4A4A
[2021-08-20 18:29:47] ------
… and the other packets decode as they arrive.
Then, either by hand or with programming skills, we use our friends “grep” & “cut” to produce the useful part of each packet - still including each packet’s index number:
RS: 0 FFD8FFE000104A46494600010101000000000000FFDB0043000C08090B09080C0B0A0B0E0D0C0E121E1412111112251A1C161E2C262E2D2B262A293036453B30334134292A3C523D41474A4D4E4D2F3A555B544B5A454C4D4AFFDB0043010D0E0E121012231414234A322A324A4A4A4A4A4A4A4A4A4A4A4A
RS: 1 4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4AFFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C1
RS: 2 1552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6
RS: 4 35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFC000110804B0064003
… and now it’s easy to see, for example, that packet #3 is missing. That will have to be obtained from another station’s download.
But once we DO have all the packets, using the method of your choice, we cut off the first 9 characters of each line, remove the ‘line-feed’ from the end of each line, & concatenate all the lines together into a single ASCII file. The result is converted to HEX and given a name that ends in .JPG.
And that’s it - we have gone from raw download packets to a complete image on the screen.
Patrick, I realize that YOU did not need all this explanation. It is my hope that my comments here might be useful or interesting to someone not as familiar with the magic of how to get from 500+ ASCII packets to a properly formatted JPG image file.
Best regards,
-Scott, K4KDR