Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

serve: phone photos reach the model rotated by 90° (EXIF Orientation is ignored)

Open Beginner friendly
#1,229 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start in serve/server.py at Vision.normalize(), where JPEGs currently pass through byte for byte. Read the attached strata-exif-orientation.patch to see the intended change: detect EXIF Orientation ≠ 1 and route those JPEGs through Pillow's ImageOps.exif_transpose() and PNG encoding like other formats, keeping a no-Pillow fallback. Verify by building a 40×20 JPEG with Orientation=6 (expect 20×40 output) and one without the tag (expect byte-identical passthrough), then confirm PNG/BMP/GIF are untouched.

Written by the indexing model from the issue text.

Description

Problem. Most phones save a portrait photo as a landscape JPEG and only set the EXIF tag Orientation (6 or 8). Vision.normalize() in serve/server.py passes JPEGs through unchanged, and strata-vision's decoder (stb_image) ignores EXIF. So the model sees the photo turned sideways. In OpenWebUI the model told me several times that my images were rotated by 90°, and it was right.

Fix. The fix is a small patch to serve/server.py, attached as strata-exif-orientation.patch. It applies to current main with git apply.

  • A JPEG with an EXIF Orientation other than 1 no longer passes through. It goes the Pillow route instead: ImageOps.exif_transpose(), then PNG, as other formats already do.
  • JPEGs without the tag, and PNG, BMP and GIF, are unchanged and still pass through byte for byte.
  • Without Pillow, _exif_rotated() returns False, so the behaviour stays as today.

Checked.

  • A 40×20 test JPEG with Orientation = 6 comes out as a 20×40 PNG.
  • The same JPEG without the tag comes out byte-identical to the input.
  • It runs live on my server: 2× TITAN RTX, UD-Q4_K_XL, images through OpenWebUI.

Written by my agent, tested on my machine.

strata-exif-orientation.patch

Dominant language
C++
Stars
11.6k
Forks
1k
Avg merge
7h 46m
Merged PRs (30d)
30

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.