From fad5aaaff564f035df088557ec5440be36dffa17 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Mon, 9 Sep 2024 03:28:32 +0100 Subject: [PATCH] Document apply_orientation as an alternative to non-in-place functions --- src/dynimage.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dynimage.rs b/src/dynimage.rs index b85bf4b0ac..d3a70387f6 100644 --- a/src/dynimage.rs +++ b/src/dynimage.rs @@ -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)) @@ -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)) @@ -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))