Intentionally Corrupt: Truncated JPEG
An intentionally corrupt JPEG, truncated to half its bytes, for testing how a decoder handles incomplete image data. This is not a valid image by design.

Specifications
- Width
- 400
- Height
- 300
- Corruption
- truncated to 50% of bytes
- Intentionally Corrupt
- true
- Alt Text
- An intentionally corrupt JPEG, truncated to half its bytes, for testing how a decoder handles incomplete image data
- Alt Text Source
- description
Testing contract
Expected to fail- Scenario
- Exercise Intentionally Corrupt: Truncated JPEG in its edge cases workflow. An intentionally corrupt JPEG, truncated to half its bytes, for testing how a decoder handles incomplete image data.
- Expected result
- Report the intended validation failure (truncated to 50% of bytes); never silently treat it as a conforming input. the structural probe reports OSError; evaluate the documented feature or defect with its format-specific reader. Declared feature checks: corruption=truncated to 50% of bytes; intentionallyCorrupt=True.
What is a .jpg file?
JPG is the common extension for JPEG, a lossy raster format that uses discrete cosine transform compression tuned for photographic images. It is 8-bit truecolor with no alpha channel, and quality is traded against file size via a compression factor. It is ubiquitous for photos on the web and from cameras.
How to use this file
Use an example JPG to test decoders, EXIF/metadata parsers, re-encoding quality, and orientation handling, or to confirm converters and image pipelines process baseline and progressive scans correctly.
How to use this file for testing
“Intentionally Corrupt: Truncated JPEG” is a deterministic Testaroo fixture for Error handling. Deliberately corrupt and invalid files, clearly labelled, for testing how your tool fails.
Documented properties for this file: 400×300 · intentionally corrupt. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.
For image AI or enhancement tools, run the model or filter on this file and diff against the clean or ground-truth companion in the same group when available. Keep seeds and documented damage parameters in your evaluation notes so regressions are attributable.
Code examples
<img src="truncated.jpg" alt="Example image" width="640" loading="lazy">Generated by generation/images_edgecases.py. Free for any use, no attribution required, license.
Related files
- log.NET Exception with an Inner Exception Chain (log)A .NET exception whose inner exception is introduced by the ---> marker and closed by End of inner exception stack trace, wrapped in pipe-delimited log lines. Error groupers that key on the outermost message alone merge two genuinely different faults here.

- xmlAlder Books Reconciliation: camt.053 whose entry count does not match its entriescamt.053 whose entry count does not match its entries for Alder Books Reconciliation. Well-formed XML with the same header, balances and TxsSummry as bank-statement-camt053.xml, but the final Ntry, TXN-024 for 206.00 on 2026-08-24, has been dropped. NbOfNtries still declares 24 while only 23 Ntry elements are present, and the entries now sum to 10442.00 against a CLBD balance of 10236.00.

- txtAlder Books Reconciliation: Fixed-width GL feed with one record a byte shortFixed-width GL feed with one record a byte short for Alder Books Reconciliation. The same 66 records as gl-feed-fixed-width.txt except that record 5 is 119 characters instead of 120: the final character of the 4-character currency field has been lost. Every other record is correct, so a reader that splits on newlines and slices by position reads USD as US on that one record and carries on silently.

- jsonAlder Books Reconciliation: Intentionally invalid semantic test recordsIntentionally invalid semantic test records for Alder Books Reconciliation. Three independent cases report duplicate-primary-key, schema-type and foreign-key errors. JSON syntax remains valid.

- csvAlder Books Reconciliation: Journal batch with one entry out by 45.00Journal batch with one entry out by 45.00 for Alder Books Reconciliation. The same 3 journals as journal-batch.csv except that line 2 of JB-2026-08-02 credits 19.50 where its debit line is 64.50. That one journal is out by 45.00; the other two balance exactly, which is what makes this the realistic case: a batch-level check catches it only because nothing else offsets it.

- txtAlder Books Reconciliation: MT940 whose :62F: closing balance is out by 100.00MT940 whose :62F: closing balance is out by 100.00 for Alder Books Reconciliation. Identical to bank-statement-mt940.txt in every tag except :62F: and :64:, which state C260824USD10336,00 where the 24 :61: movements applied to the :60F: opening balance give C260824USD10236,00. The file is out by exactly 100.00 and nothing inside the statement explains the difference.
