We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aa3598a + 8166a61 commit d084f68Copy full SHA for d084f68
crate/src/effects.rs
@@ -199,6 +199,20 @@ pub fn multiple_offsets(
199
}
200
201
/// Halftoning effect.
202
+///
203
+/// # Arguments
204
+/// * `img` - A PhotonImage that contains a view into the image.
205
+/// # Example
206
207
+/// ```no_run
208
+/// // For example:
209
+/// use photon_rs::effects::halftone;
210
+/// use photon_rs::native::open_image;
211
212
+/// let mut img = open_image("img.jpg").expect("File should open");
213
+/// halftone(&mut img);
214
+/// ```
215
+#[cfg_attr(feature = "enable_wasm", wasm_bindgen)]
216
pub fn halftone(photon_image: &mut PhotonImage) {
217
let mut img = helpers::dyn_image_from_raw(photon_image);
218
let (width, height) = img.dimensions();
0 commit comments