Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to apply Exif rotation #2299

Merged
merged 20 commits into from
Sep 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d9b4517
Add in-place 180 degree rotation to DynamicImage
Shnatsel Jul 27, 2024
da93b9d
Doc comment: when rotating 180 degrees, direction doesn't matter
Shnatsel Jul 27, 2024
f8cea83
Add in-place flips to DynamicImage
Shnatsel Jul 27, 2024
a799736
Add a function to apply Exif rotation
Shnatsel Jul 30, 2024
fb1ccaf
Do not promise to implement complex algorithms that aren't currently …
Shnatsel Jul 30, 2024
d3a8acf
Create a type to encode image orientation, accept it in the function …
Shnatsel Sep 1, 2024
91f15b1
Make newly added in-place transformation functions private
Shnatsel Sep 9, 2024
92d2ec2
Change doc comment following review comment
Shnatsel Sep 9, 2024
ecdf8f5
Rename flip orientations to make them more explicit
Shnatsel Sep 9, 2024
fad5aaa
Document apply_orientation as an alternative to non-in-place functions
Shnatsel Sep 9, 2024
c3cec8c
Suppress Clippy false positive
Shnatsel Sep 9, 2024
873c410
Link to Clippy lint issue instead of just handwaving
Shnatsel Sep 9, 2024
644b68e
Merge branch 'image-rs:main' into exif-rotation
Shnatsel Sep 9, 2024
9d1a694
Make apply_orientation infallible now that it accepts an enum
Shnatsel Sep 9, 2024
25bd5eb
Fix incorrect doc comment
Shnatsel Sep 12, 2024
b4cb2d6
Fix erroneous exif conversion for value 7
Shnatsel Sep 13, 2024
9c0d517
Add a function to convert from Orientation to Exif values
Shnatsel Sep 13, 2024
005844d
Rename the module with `Orientation` struct to `metadata`
Shnatsel Sep 13, 2024
c461e99
Fix doclinks
Shnatsel Sep 13, 2024
6dad395
Link from Orientation struct to the function that applies it
Shnatsel Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Link to Clippy lint issue instead of just handwaving
Shnatsel committed Sep 9, 2024
commit 873c410b24a29e588e197146458a125cd43364a6
2 changes: 1 addition & 1 deletion src/dynimage.rs
Original file line number Diff line number Diff line change
@@ -931,7 +931,7 @@ impl DynamicImage {
/// If this matters to you, please see the documentation on the variants of [Orientation]
/// to learn which orientations can and cannot be applied without copying.
pub fn apply_orientation(&mut self, orientation: Orientation) -> Result<(), ImageError> {
#![allow(clippy::unit_arg)] // false positive, requires multiple lines for no reason
#![allow(clippy::unit_arg)] // https://github.com/rust-lang/rust-clippy/issues/6521
let image = self;
match orientation {
Orientation::NoTransforms => Ok(()),