Skip to content

Commit

Permalink
Document apply_orientation as an alternative to non-in-place functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnatsel committed Sep 9, 2024
1 parent ecdf8f5 commit fad5aaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dynimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ impl DynamicImage {
}

/// Flip this image vertically
///
/// Use [`apply_orientation`] of you want to flip the image in-place instead.
#[must_use]
pub fn flipv(&self) -> DynamicImage {
dynamic_map!(*self, ref p => imageops::flip_vertical(p))
Expand All @@ -884,6 +886,8 @@ impl DynamicImage {
}

/// Flip this image horizontally
///
/// Use [`apply_orientation`] of you want to flip the image in-place.
#[must_use]
pub fn fliph(&self) -> DynamicImage {
dynamic_map!(*self, ref p => imageops::flip_horizontal(p))
Expand All @@ -901,6 +905,8 @@ impl DynamicImage {
}

/// Rotate this image 180 degrees.
///
/// Use [`apply_orientation`] of you want to rotate the image in-place.
#[must_use]
pub fn rotate180(&self) -> DynamicImage {
dynamic_map!(*self, ref p => imageops::rotate180(p))
Expand Down

0 comments on commit fad5aaa

Please sign in to comment.