[][src]Function photon_rs::filters::filter

pub fn filter(img: &mut PhotonImage, filter_name: &str)

Apply a filter to an image. Over 20 filters are available. The filters are as follows:

  • oceanic: Add an aquamarine-tinted hue to an image.
  • islands: Aquamarine tint.
  • marine: Add a green/blue mixed hue to an image.
  • seagreen: Dark green hue, with tones of blue.
  • flagblue: Royal blue tint
  • liquid: Blue-inspired tint.
  • diamante: Custom filter with a blue/turquoise tint.
  • radio: Fallout-style radio effect.
  • twenties: Slight-blue tinted historical effect.
  • rosetint: Rose-tinted filter.
  • mauve: Purple-infused filter.
  • bluechrome: Blue monochrome effect.
  • vintage: Vintage filter with a red tint.
  • perfume: Increase the blue channel, with moderate increases in the Red and Green channels.
  • serenity: Custom filter with an increase in the Blue channel's values.

Arguments

  • img - A PhotonImage.
  • blend_mode - The blending mode to use. See above for complete list of blend modes available.

Example

// For example, to add a filter called "vintage" to an image:
use photon::filters;
photon::filters::filter(&mut img, "vintage");