You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serve: phone photos reach the model rotated by 90° (EXIF Orientation is ignored) #1229
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.
Fixed in 0.1.40.2: a JPEG with an EXIF Orientation other than 1 is turned upright (Pillow, then PNG) before the encoder reads it. JPEGs without the tag, PNG, BMP and GIF pass through byte for byte, and without Pillow nothing changes. Thanks for the patch and the checks.
Activity
vision: a JPEG with an EXIF Orientation other than 1 is turned uprigh…
Niko1221 commentedon Oct 7, 2026
Fixed in 0.1.40.2: a JPEG with an EXIF Orientation other than 1 is turned upright (Pillow, then PNG) before the encoder reads it. JPEGs without the tag, PNG, BMP and GIF pass through byte for byte, and without Pillow nothing changes. Thanks for the patch and the checks.
Merge upstream/main (0.1.40.2) into ash/main
vision: a JPEG with an EXIF Orientation other than 1 is turned uprigh…
serve: the batch slots view and the optional Pillow imports pass the …