Filter
enum Filter
Available filters for processing
Check Thumbor’s documentation for further explanation of each filter.
-
Overrides the server
AUTO_PNG_TO_JPG
configDeclaration
Swift
case autoJPG(Bool)
-
Sets the background layer to the specified color
Declaration
Swift
case backgroundColor(UIColor)
-
Applies Gaussian blur
Declaration
Swift
case blur(radius: Float, sigma: Int)
-
Increases or decreases the image brightness
Ranges from -100 to 100
Declaration
Swift
case brightness(Int)
-
Increases or decreases the image contrast
Ranges from -100 to 100
Declaration
Swift
case contrast(Int)
-
Runs a convolution matrix (or kernel) on the image
Declaration
Swift
case convolution(matrix: [[Int]], normalize: Bool)
-
Equalizes the color distribution in the image
Declaration
Swift
case equalize
-
Use focal points when converting the image
Declaration
Swift
case extractFocalPoints
-
Returns an image sized exactly as requested wherever is its ratio by filling with chosen color the missing parts. Usually used with
fit-in
Declaration
Swift
case filling(color: UIColor, fillTransparent: Bool)
-
Adds a focal point to be used in later transforms
Declaration
Swift
case focal(top: Int, left: Int, bottom: Int, right: Int)
-
Specifies the output format of the image
Declaration
Swift
case format(Format)
-
Converts the image to grayscale
Declaration
Swift
case grayScale
-
Degrades the quality of the image until the image is under the specified amount of bytes
Declaration
Swift
case maxBytes(Int)
-
Prevents thumbor from upscaling images
Declaration
Swift
case noUpscale
-
Adds noise to the image
Declaration
Swift
case noise(Int)
-
Specifies the proportion of the output image, relative to the input’s dimensios or the output size, if specified
Declaration
Swift
case proportion(Float)
-
Changes the overall quality of the JPEG image (does nothing for PNGs or GIFs)
Ranges from 0 to 100
Declaration
Swift
case quality(Int)
-
Declaration
Swift
case redEye
-
Changes the amount of color in each of the three channels
Channels range from -100 to 100
Declaration
Swift
case rgb(red: Int, green: Int, blue: Int)
-
Rotates the image
Angle ranges from 0 to 359
Declaration
Swift
case rotate(Int)
-
Adds rounded corners to the image
Declaration
Swift
case roundCorners(Int)
-
Enhances apparent sharpness of the image
Declaration
Swift
case sharpen(amount: Float, radius: Float, luminanceOnly: Bool)
-
Resizes the image without cropping
Declaration
Swift
case stretch
-
Removes EXIF information
This is useful if your server has set PRESERVE_EXIF_INFO = True but still wish to overwrite this behavior in some cases
Declaration
Swift
case stripEXIF
-
Removes any ICC information
Declaration
Swift
case stripICC
-
Upscale
This only makes sense with “fitIn”
Declaration
Swift
case upscale
-
Adds a watermark image on top of the original
Declaration
Swift
case watermark(url: String, x: Int, y: Int, alpha: Int, widthRatio: Float?, heightRatio: Float?)