Skip to content

Commit b90198a

Browse files
committed
fix: detect ORIENTATION_ROTATE_270 in EXIF rotation check
shouldRotateByExif previously only returned true for ORIENTATION_ROTATE_90. Some Camera1 devices report ORIENTATION_ROTATE_270 for the same physical orientation; the function now returns true in both cases so the bitmap transform is applied correctly on such devices. Also add markdown language identifier to the summary table code block in the pr-review skill (MD040 lint fix).
1 parent 975dba7 commit b90198a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/skills/pr-review/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Before acting on any review comment or suggestion, classify it by importance:
9191
- After all fixes: summary of check statuses confirming all green
9292
- **Review summary table** — produced at the end of every review session:
9393

94-
```
94+
```markdown
9595
| # | Source (comment / CI) | Issue description | Priority | Action taken | Reason if not fixed |
9696
|---|-----------------------|-------------------|----------|--------------|---------------------|
9797
| 1 | Reviewer @xxx | e.g. rename foo() | P3 | Not fixed | Style preference, no functional impact — deferred to user |

library/src/main/java/org/wysaid/view/CameraGLSurfaceViewWithTexture.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ private Boolean shouldRotateByExif(byte[] jpegData) {
455455

456456
ExifInterface exifInterface = new ExifInterface(tmpFilename);
457457
int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
458-
return orientation == ExifInterface.ORIENTATION_ROTATE_90;
458+
return orientation == ExifInterface.ORIENTATION_ROTATE_90
459+
|| orientation == ExifInterface.ORIENTATION_ROTATE_270;
459460
} catch (IOException e) {
460461
Log.e(LOG_TAG, "Err when reading exif from cache image: " + e.toString());
461462
return null;

0 commit comments

Comments
 (0)