Gin
Enumerations | Functions

Enumerations

enum class  ResizeAlgorirm { avir , lanczos }
 A very high quality image resize using a bank of sinc function-based fractional delay filters. More...
 
enum  BlendMode {
  Normal , Lighten , Darken , Multiply ,
  Average , Add , Subtract , Difference ,
  Negation , Screen , Exclusion , Overlay ,
  SoftLight , HardLight , ColorDodge , ColorBurn ,
  LinearDodge , LinearBurn , LinearLight , VividLight ,
  PinLight , HardMix , Reflect , Glow ,
  Phoenix
}
 Blending modes for applyBlend. More...
 

Functions

void applyVignette (juce::Image &img, float amount, float radius, float falloff, juce::ThreadPool *threadPool=nullptr)
 Apply vignette. More...
 
void applySepia (juce::Image &img, juce::ThreadPool *threadPool=nullptr)
 Make it look old. More...
 
void applyGreyScale (juce::Image &img, juce::ThreadPool *threadPool=nullptr)
 Converts image to B/W, heavier weighting towards greens. More...
 
void applySoften (juce::Image &img, juce::ThreadPool *threadPool=nullptr)
 Softens an image. More...
 
void applySharpen (juce::Image &img, juce::ThreadPool *threadPool=nullptr)
 Sharpens an image. More...
 
void applyGamma (juce::Image &img, float gamma, juce::ThreadPool *threadPool=nullptr)
 
void applyInvert (juce::Image &img, juce::ThreadPool *threadPool=nullptr)
 Inverts colours of an image. More...
 
void applyContrast (juce::Image &img, float contrast, juce::ThreadPool *threadPool=nullptr)
 Adjust contrast of an image. More...
 
void applyBrightnessContrast (juce::Image &img, float brightness, float contrast, juce::ThreadPool *threadPool=nullptr)
 Adjust brightness and contrast of an image. More...
 
void applyHueSaturationLightness (juce::Image &img, float hue, float saturation, float lightness, juce::ThreadPool *threadPool=nullptr)
 Adjust hue, saturation and lightness of an image. More...
 
void applyStackBlur (juce::Image &img, int radius)
 A very fast blur. More...
 
juce::Image applyResize (const juce::Image &img, int width, int height, ResizeAlgorirm resizeAlgorirm=ResizeAlgorirm::avir)
 
juce::Image applyResize (const juce::Image &img, float factor, ResizeAlgorirm resizeAlgorirm=ResizeAlgorirm::avir)
 
void applyGradientMap (juce::Image &img, const juce::ColourGradient &gradient, juce::ThreadPool *threadPool=nullptr)
 GradientMap a image. More...
 
void applyGradientMap (juce::Image &img, const juce::Colour c1, const juce::Colour c2, juce::ThreadPool *threadPool=nullptr)
 
void applyColour (juce::Image &img, juce::Colour c, juce::ThreadPool *threadPool=nullptr)
 Set an image to a solid colour. More...
 
void applyBlend (juce::Image &dst, const juce::Image &src, BlendMode mode, float alpha=1.0f, juce::Point< int > position={}, juce::ThreadPool *threadPool=nullptr)
 Blend two images. More...
 
void applyBlend (juce::Image &dst, BlendMode mode, juce::Colour c, juce::ThreadPool *threadPool=nullptr)
 Blend two images. More...
 

Detailed Description

Enumeration Type Documentation

◆ ResizeAlgorirm

enum ResizeAlgorirm
strong

A very high quality image resize using a bank of sinc function-based fractional delay filters.

Enumerator
avir 
lanczos 

◆ BlendMode

enum BlendMode

Blending modes for applyBlend.

Enumerator
Normal 
Lighten 
Darken 
Multiply 
Average 
Add 
Subtract 
Difference 
Negation 
Screen 
Exclusion 
Overlay 
SoftLight 
HardLight 
ColorDodge 
ColorBurn 
LinearDodge 
LinearBurn 
LinearLight 
VividLight 
PinLight 
HardMix 
Reflect 
Glow 
Phoenix 

Function Documentation

◆ applyVignette()

void applyVignette ( juce::Image &  img,
float  amount,
float  radius,
float  falloff,
juce::ThreadPool *  threadPool = nullptr 
)

Apply vignette.

Parameters
amountAmount to darken outside of vignette. 0 no darkening. 1 is black.
radiusSize of vignette. 1 size of image. 0 is 0 size.
falloffRelative size of inner boundry of vignette 0,1

◆ applySepia()

void applySepia ( juce::Image &  img,
juce::ThreadPool *  threadPool = nullptr 
)

Make it look old.

◆ applyGreyScale()

void applyGreyScale ( juce::Image &  img,
juce::ThreadPool *  threadPool = nullptr 
)

Converts image to B/W, heavier weighting towards greens.

◆ applySoften()

void applySoften ( juce::Image &  img,
juce::ThreadPool *  threadPool = nullptr 
)

Softens an image.

◆ applySharpen()

void applySharpen ( juce::Image &  img,
juce::ThreadPool *  threadPool = nullptr 
)

Sharpens an image.

◆ applyGamma()

void applyGamma ( juce::Image &  img,
float  gamma,
juce::ThreadPool *  threadPool = nullptr 
)

◆ applyInvert()

void applyInvert ( juce::Image &  img,
juce::ThreadPool *  threadPool = nullptr 
)

Inverts colours of an image.

◆ applyContrast()

void applyContrast ( juce::Image &  img,
float  contrast,
juce::ThreadPool *  threadPool = nullptr 
)

Adjust contrast of an image.

Parameters
contrastAmount to adjust contrast. Negative values increase, positive values increase

◆ applyBrightnessContrast()

void applyBrightnessContrast ( juce::Image &  img,
float  brightness,
float  contrast,
juce::ThreadPool *  threadPool = nullptr 
)

Adjust brightness and contrast of an image.

Parameters
brightnessAmount to adjust brightness -100,100
contrastAmount to adjust contrast -100,100

◆ applyHueSaturationLightness()

void applyHueSaturationLightness ( juce::Image &  img,
float  hue,
float  saturation,
float  lightness,
juce::ThreadPool *  threadPool = nullptr 
)

Adjust hue, saturation and lightness of an image.

Parameters
hueAmount to adjust hue -180,180
saturationAmount to adjust saturation 0,200
lightnessAmount to adjust lightness -100,100

◆ applyStackBlur()

void applyStackBlur ( juce::Image &  img,
int  radius 
)

A very fast blur.

This is a compromise between Gaussian Blur and Box blur. It creates much better looking blurs than Box Blur, but is 7x faster than some Gaussian Blur implementations.

Parameters
radiusfrom 2 to 254

◆ applyResize() [1/2]

juce::Image applyResize ( const juce::Image &  img,
int  width,
int  height,
ResizeAlgorirm  resizeAlgorirm = ResizeAlgorirm::avir 
)

◆ applyResize() [2/2]

juce::Image applyResize ( const juce::Image &  img,
float  factor,
ResizeAlgorirm  resizeAlgorirm = ResizeAlgorirm::avir 
)

◆ applyGradientMap() [1/2]

void applyGradientMap ( juce::Image &  img,
const juce::ColourGradient &  gradient,
juce::ThreadPool *  threadPool = nullptr 
)

GradientMap a image.

Brightness gets remapped to colour on a gradient.

◆ applyGradientMap() [2/2]

void applyGradientMap ( juce::Image &  img,
const juce::Colour  c1,
const juce::Colour  c2,
juce::ThreadPool *  threadPool = nullptr 
)

◆ applyColour()

void applyColour ( juce::Image &  img,
juce::Colour  c,
juce::ThreadPool *  threadPool = nullptr 
)

Set an image to a solid colour.

◆ applyBlend() [1/2]

void applyBlend ( juce::Image &  dst,
const juce::Image &  src,
BlendMode  mode,
float  alpha = 1.0f,
juce::Point< int >  position = {},
juce::ThreadPool *  threadPool = nullptr 
)

Blend two images.

◆ applyBlend() [2/2]

void applyBlend ( juce::Image &  dst,
BlendMode  mode,
juce::Colour  c,
juce::ThreadPool *  threadPool = nullptr 
)

Blend two images.