JPEG: Missing end marker
What to check and how to proceed
A missing FF D9 can occur after truncation. Determine whether all expected scan data can be decoded before attempting a terminator correction. Keep a copy of the decoder's warnings.
How to verify the result
Check bottom rows and image dimensions; adding an end marker does not replace missing coefficients.
Recovery limits
A terminator cannot replace truncated scan data.
FileRevivo: supported inspection and recovery options. Check tool limitations before use.
Measured missing-marker test
A generated 16 × 12 JPEG was shortened by exactly its final two EOI bytes. Deep recovery appended the marker and returned bytes identical to the undamaged reference. This worked because the compressed image scan was otherwise intact. A separate malformed segment test was rejected. A missing marker in a real file may also mean that image samples are missing.