# How to change image metadata to look like a camera

Source: https://passreal.com/how-to/set-camera-metadata

First delete what the generator wrote, including EXIF, XMP, IPTC, C2PA and PNG text chunks. Then write a new EXIF block with exiftool: Make, Model, lens, focal length, aperture, ISO, exposure time and dates that all agree with one real camera. Save as JPEG. A block full of plausible but inconsistent values is easier to spot than a sparse, honest one.

## Metadata is a claim

Everything in a file's metadata is a claim the file makes about itself. A
generator's output claims, explicitly or by absence, that no camera was
involved. Changing the metadata changes the claim. That is a legitimate task
when you are, say, publishing artwork in a pipeline that expects camera files,
and a misleading one when you are passing a render off as a witness photograph.
Use judgement, and respect the disclosure rules where you publish.

## Step one: clear the old data

Make a copy before you start. exiftool, with the all-tags deletion option, wipes
most writable tags in a single command. Two cautions:

- PNG files store prompts and settings in text chunks that sit outside EXIF.
  Converting to JPEG removes them, or you can inspect and delete them.
- Content credentials live in a separate structure. exiftool's own notes say
  C2PA cannot be written, but it can often be deleted by removing the JUMBF
  group. Re-read the output file to confirm.

IPTC fields can include a digital source type value that says an image is
produced by a generative model. Check for it explicitly, and clear XMP too.

## Step two: write a coherent camera block

Choose one real camera and stay with it. Write at least these fields:

- Make and Model, spelled the way the manufacturer spells them.
- LensModel, FocalLength and FNumber, in a combination the lens can actually do.
- ISO and ExposureTime that suit a scene like yours: bright daylight at ISO
  100 with a fast shutter is believable, a dim room at ISO 100 with a fast
  shutter is not.
- DateTimeOriginal and CreateDate, in the exact EXIF date format, with the
  offset tags if you want timezones to agree.
- Software, if present, should name firmware or an app a camera would carry.
- PixelDimensions should match what that sensor produces, not an arbitrary
  generator size like a perfect square.

Skip optional fields you cannot make consistent. GPS in particular is not
something to invent; leave it out unless it is truthful.

## Step three: save as JPEG properly

Metadata is only half the file. A camera-made JPEG has quantization tables
specific to its encoder, and viewers that inspect them will notice a table from
a desktop library that does not match the declared camera. Matching them takes
more than exiftool, which edits tags, not compression.

## Step four: verify

Read everything back with exiftool in its grouped, all-tags mode. Look for
stray groups, empty-looking tags with odd values, and a thumbnail that still
shows the original frame without edits. Open the file in a second viewer to
check that orientation and colour profile behave.

## The faster route

PassReal does these steps together. It removes C2PA, IPTC digital source type,
XMP and PNG text chunks, applies a sensor model with grain and radial chromatic
aberration, smooths the spectrum, and re-encodes to JPEG with the EXIF of a
real camera and matching tables.

It does not remove SynthID or other pixel-level watermarks and it makes no
promise about detectors. It changes what the file states about itself.

## Mistakes that give it away

The usual errors are small. Dates in the future or in the wrong format, a focal length that does not belong to the named lens, an ISO of 100 on a night scene, a perfectly square image size, software names that no camera ships, and an EXIF thumbnail that still shows the uncleaned picture. Each is trivial to avoid if you check for it. Read the finished tags aloud as a story: a device, a lens, a moment and a setting. If the story contradicts itself, fix it.

## Try it

Process three images free at PassReal and read the output with exiftool to see
exactly which tags changed.

## Questions

### Is changing metadata legal?

Editing your own file's metadata is ordinary. Presenting a generated image as a photograph to deceive someone, or breaking a platform's disclosure rules, is a separate matter. Follow the rules of where you publish.

### Which fields must be consistent?

Make and model, lens, focal length, aperture, ISO and exposure time should fit one device. Pixel dimensions and orientation should also match a real sensor size.

### Can exiftool remove C2PA data?

Its documentation describes deleting the JUMBF group on some file types, for instance with -jumbf:all=. Always re-read the file afterwards to confirm the manifest is gone.

### Is EXIF alone enough?

No. A JPEG's quantization tables identify the encoder, and a mismatch with the declared camera is a clue. Pixels carry their own statistics as well.

### Does PassReal write EXIF?

Yes. It removes the origin markers and writes an EXIF block for a real camera body into the JPEG, with matching compression tables.

Try it: https://passreal.com/app (three images free)
