Function pixelize

Source
pub fn pixelize(photon_image: &mut PhotonImage, pixel_size: i32)
Expand description

Pixelize an image.

§Arguments

  • photon_image - A PhotonImage that contains a view into the image.
  • pixel_size - Targeted pixel size of generated image.

§Example

// For example, to turn an image of type `PhotonImage` into a pixelized image with 50 pixels blocks:
use photon_rs::effects::pixelize;
use photon_rs::native::open_image;

let mut img = open_image("img.jpg").expect("File should open");
pixelize(&mut img, 50);