ALBUM / PHOTO-ARKHIVE Image Ops Lab
Bake rotation Lossless JPEG Manual color correction AI ethics

Scanned photos need orientation and restoration rules before they need more filters.

The research notes are blunt on this point: scanner files do not come with meaningful orientation data, one-click AI is not the same as restoration, and the safest workflow is still master first, derivative second.

Orientation

Normalize rotation before deeper cleanup starts.

The safe target is simple: rotate pixels into the correct position and leave orientation state at normal so later tools do not fight each other.

EXIF tags are not enough

Camera photos often carry orientation tags. Scanner files usually do not. If the pixels are sideways, EXIF-aware auto-rotate will not rescue the scan on its own.

Bake then reset

Rotate the actual image data, then normalize orientation metadata to 1 so browsers, editors, OpenCV pipelines, and CMS viewers stop disagreeing.

Use AI cues for scans

Faces, sky/ground cues, and text direction are the real signals for scanned-photo orientation. Low-confidence files still need human review.

Manual QA is part of the workflow

Even strong models miss edge cases. Do one thumbnail pass in a fast viewer before you declare the batch done.

Lossless JPEG and EXIF commands

jhead -autorot *.jpg
jhead -autorot -ft *.jpg

magick mogrify -auto-orient *.jpg

exiftool -Orientation -n image.jpg
exiftool -Orientation=1 -n -overwrite_original *.jpg

Content-aware detection examples

# OCR-based orientation check
import pytesseract
results = pytesseract.image_to_osd(
  image,
  config='--psm 0',
  output_type=pytesseract.Output.DICT
)
angle = results['rotate']

Use OCR for text-heavy images, face-based rotation where portraits dominate, and a general image-orientation model for the rest.

Common failure: rotating pixels in one app and leaving stale orientation tags behind causes double-rotated images later.

Restore

Use the smallest tool that solves the actual damage.

The research splits restoration into clear levels: global auto-fixes, manual channel correction, and AI reconstruction for the hardest images.

Advanced AI

GFPGAN + Real-ESRGAN tier

Use higher-end AI only when the image actually needs facial reconstruction or stronger super-resolution, and always keep the original beside it.

Good for: tiny degraded faces, difficult recovery cases, derivative presentation versions.
Watch for: identity drift and invented detail.

White balance first

Correct overall tint before local cleanup. Magenta drift often needs a push back toward green before the image even reads correctly.

Per-channel curves next

Severe fading is usually not global. Work channel by channel to rebuild balance instead of over-driving one exposure slider.

Heal after tone

Dust, scratches, and edge grime are easier to judge after exposure and color are closer to the target.

B&W fallback is valid

If the color dyes are too far gone, a strong black-and-white derivative can preserve the image more honestly than a bad pseudo-color rescue.

Ethics

Repair and invention are not the same thing.

The research is clear: dust removal and tear repair recover damaged source material; colorization and face reconstruction create a new interpretive version.

Preserve the original scan

Keep an untouched TIFF or first-generation master before any AI enhancement, cleanup, crop, or export pass begins.

Label AI-enhanced outputs

Write captions, sidecars, or metadata that clearly say when a file has been upscaled, colorized, or face-restored.

Show original beside derivative

For family history work, pair the historical scan with the polished derivative so no one mistakes the AI version for the only truth.

Prefer local tools for sensitive photos

If the image is private or legally sensitive, favor local processing pipelines over cloud upload tools that keep copies or train on user content.

Line to hold: removing dust is restoration; inventing skin detail, smiles, or speculative color is a new derivative and should be treated that way.