A working example, with the files
Compare an image copy with a re-export
Use a file hash to compare bytes and a metadata check to inspect saved records. A new export can show the same picture while changing both the file hash and the available creation details.
Follow the steps
- Download the parameters original, its byte copy and its PNG re-export below.
- Compare the original with the byte copy. In this fixture, the file SHA-256 and all readable records match.
- Compare the original with the re-export. The decoded pixels match, but the file hash changes and the prompt is no longer readable.
The exact operations tested
The byte copy was made with Buffer.from(input). The re-export was made with sharp(input).png().toBuffer() using the library version recorded in the results JSON. These are local operations, not an experiment on a social website.
The example isolates a practical difference: preserving the original byte stream preserves its attached records. Writing a new image file can handle metadata differently.
Use the right comparison
The browser file-hash tool reports SHA-256 for the complete chosen file. The pixel comparison tool instead compares decoded image pixels. Use the metadata comparison tool for named prompt, setting and workflow fields.
A different hash is not an explanation of what changed. A matching pixel comparison is not an explanation of how those pixels were made. Record each observation separately.
Keep a source copy
When the original matters to a review, keep it alongside transformed copies. Record which operation made each copy, then test its result. Do not assume that a metadata-preservation option covers every custom field; verify the exact fields you need.
Download · Run · Compare
Try the verified example
We drew the picture by code and attached controlled records. The saved prompts and model names are demonstration data. These files test record reading; no image generator, screenshot app or social network was used to create these test results.
Observed output
| Field | Before | After | State |
|---|---|---|---|
| Saved prompt | Controlled example: a paper boat on a blue table | Controlled example: a paper boat on a blue table | Same |
| Seed | 42 | 42 | Same |
| Steps | 20 | 20 | Same |
| Saved generation width | 1024 | 1024 | Same |
| Saved generation height | 768 | 768 | Same |
| Field | Before | After | State |
|---|---|---|---|
| Saved prompt | Controlled example: a paper boat on a blue table | Not read | Not readable in the later file |
| Seed | 42 | Not read | Not readable in the later file |
| Steps | 20 | Not read | Not readable in the later file |
| Saved generation width | 1024 | Not read | Not readable in the later file |
| Saved generation height | 768 | Not read | Not readable in the later file |
Seed values in the JSON are strings so that large integers retain their precision. A null result here means no supported saved prompt was returned.
Hashes and reproduction
- parameters-tEXt.png · 13,371 bytes
e76d2af4e6c273e1ba8ca6cf2b5b7885ceda2321bce893f0bb5f9e64ace17c9f - original-copy.png · 13,371 bytes
e76d2af4e6c273e1ba8ca6cf2b5b7885ceda2321bce893f0bb5f9e64ace17c9f - reencoded.png · 13,179 bytes
acdc3a0a5e011cf57af9bf0f1da74c75c2d280a2cc9af9297410c529f86932cf
Fixtures and observations are CC0-1.0. Download all observations and versions or read the procedure. The complete Node.js reproduction script (requires sharp) creates the same test inputs and compares bytes and pixels. The isGenAI source checkout additionally verifies saved fields with npx tsx scripts/build-guide-lab.ts.
For the separate export study, explore the 18 metadata-retention cases.
Sources and method
The linked primary sources describe the formats. The downloadable fixture outputs were checked with automated assertions against the current isGenAI reader. These guides were prepared with AI assistance and reviewed against those examples.
Report an error or unsupported example. For a signed record, inspect Content Credentials.