Skip to content

Commit

Permalink
Updated documentation for adjust_brightness function
Browse files Browse the repository at this point in the history
  • Loading branch information
silvia-odwyer committed Oct 31, 2024
1 parent 659fecd commit e01c939
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crate/src/effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,15 +547,17 @@ pub fn solarize_retimg(photon_image: &PhotonImage) -> PhotonImage {
///
/// # Arguments
/// * `img` - A PhotonImage that contains a view into the image.
/// * `brightness` - A u8 to add/subtract to the brightness.
/// * `brightness` - A u8 to add or subtract to the brightness. To increase
/// the brightness, pass a positive number (up to 255). To decrease the brightness,
/// pass a negative number instead.
/// # Example
///
/// ```no_run
/// use photon_rs::effects::adjust_brightness;
/// use photon_rs::native::open_image;
///
/// let mut img = open_image("img.jpg").expect("File should open");
/// adjust_brightness(&mut img, 10_u8);
/// adjust_brightness(&mut img, 10_i16);
/// ```
#[cfg_attr(feature = "enable_wasm", wasm_bindgen)]
pub fn adjust_brightness(photon_image: &mut PhotonImage, brightness: i16) {
Expand Down

0 comments on commit e01c939

Please sign in to comment.