Declared in UIImage+BFKit.h

Overview

This category adds some useful methods to UIImage

Tasks

Class Methods

dummyImageNamed:

+ (UIImage *_Nullable)dummyImageNamed:(NSString *_Nonnull)name
Discussion

Create a dummy image

Parameters

name

To use it, name parameter must contain: “dummy.100x100” and “dummy.100x100.#FFFFFF” or “dummy.100x100.blue” (if it’s a color defined in UIColor class) if you want to define a color

Return Value

Returns the created dummy image

Declared In

UIImage+BFKit.h

imageFromText:font:fontSize:imageSize:

+ (UIImage *_Nonnull)imageFromText:(NSString *_Nonnull)text font:(FontName)fontName fontSize:(CGFloat)fontSize imageSize:(CGSize)imageSize
Discussion

Create an image from a given text

Parameters

text

Text

fontName

Text’s font name

fontSize

Text’s font size

imageSize

Image’s size

Return Value

Returns the created UIImage

Declared In

UIImage+BFKit.h

imageWithColor:

+ (UIImage *_Nonnull)imageWithColor:(UIColor *_Nonnull)color
Discussion

Create an image from a given color

Parameters

color

Color value

Return Value

Returns the created UIImage

Declared In

UIImage+BFKit.h

imageWithSize:backgroundColor:maskedText:font:fontSize:

+ (UIImage *_Nonnull)imageWithSize:(CGSize)imageSize backgroundColor:(UIColor *_Nonnull)backgroundColor maskedText:(NSString *_Nonnull)string font:(FontName)fontName fontSize:(CGFloat)fontSize
Discussion

Create an image with a background color and with a text with a mask

Parameters

imageSize

Image’s size

backgroundColor

Image’s background color

string

Text to mask

fontName

Text’s font name

fontSize

Text’s font size

Return Value

Returns the created UIImage

Declared In

UIImage+BFKit.h

Instance Methods

blendMode:

- (UIImage *_Nonnull)blendMode:(CGBlendMode)blendMode
Discussion

Apply the given Blend Mode

Parameters

blendMode

The choosed Blend Mode

Return Value

Returns the image

Declared In

UIImage+BFKit.h

blendOverlay

- (UIImage *_Nonnull)blendOverlay
Discussion

Apply the Blend Mode Overlay

Return Value

Returns the image

Declared In

UIImage+BFKit.h

bloom:intensity:

- (UIImage *_Nonnull)bloom:(float)radius intensity:(float)intensity
Discussion

Apply the bloom effect to the image

Parameters

radius

Radius of the bloom

intensity

Intensity of the bloom

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

blurImageWithBlur:

- (UIImage *_Nonnull)blurImageWithBlur:(CGFloat)blur
Discussion

Apply the blur effect to the image

Parameters

blur

Radius of the blur

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

boxBlurImageWithBlur:

- (UIImage *_Nonnull)boxBlurImageWithBlur:(CGFloat)blur
Discussion

Apply the blur effect to the image

Parameters

blur

Radius of the blur

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

bumpDistortion:radius:scale:

- (UIImage *_Nonnull)bumpDistortion:(CIVector *_Nonnull)center radius:(float)radius scale:(float)scale
Discussion

Apply the bump distortion effect to the image

Parameters

center

Vector of the distortion. Use [CIVector vectorWithX:Y:]

radius

Radius of the effect

scale

Scale of the effect

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

bumpDistortionLinear:radius:angle:scale:

- (UIImage *_Nonnull)bumpDistortionLinear:(CIVector *_Nonnull)center radius:(float)radius angle:(float)angle scale:(float)scale
Discussion

Apply the bump distortion linear effect to the image

Parameters

center

Vector of the distortion, use [CIVector vectorWithX:Y:]

radius

Radius of the effect

angle

Angle of the effect in radians

scale

Scale of the effect

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

circleSplashDistortion:radius:

- (UIImage *_Nonnull)circleSplashDistortion:(CIVector *_Nonnull)center radius:(float)radius
Discussion

Apply the circular splash distortion effect to the image

Parameters

center

Vector of the distortion, use [CIVector vectorWithX:Y:]

radius

Radius of the effect

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

circularWrap:radius:angle:

- (UIImage *_Nonnull)circularWrap:(CIVector *_Nonnull)center radius:(float)radius angle:(float)angle
Discussion

Apply the circular wrap effect to the image

Parameters

center

Vector of the distortion, use [CIVector vectorWithX:Y:]

radius

Radius of the effect

angle

Angle of the effect in radians

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

cmykHalftone:width:angle:sharpness:gcr:ucr:

- (UIImage *_Nonnull)cmykHalftone:(CIVector *_Nonnull)center width:(float)width angle:(float)angle sharpness:(float)sharpness gcr:(float)gcr ucr:(float)ucr
Discussion

Apply the CMY halftone effect to the image

Parameters

center

Vector of the distortion, use [CIVector vectorWithX:Y:]

width

Width value

angle

Angle of the effect in radians

sharpness

Sharpness Value

gcr

GCR value

ucr

UCR value

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

fillAlpha

- (UIImage *_Nonnull)fillAlpha
Discussion

Fill the alpha with the white color

Return Value

Returns the filled image

Declared In

UIImage+BFKit.h

fillAlphaWithColor:

- (UIImage *_Nonnull)fillAlphaWithColor:(UIColor *_Nonnull)color
Discussion

Fill the alpha with the given color

Parameters

color

Color to fill

Return Value

Returns the filled image

Declared In

UIImage+BFKit.h

flipImageHorizontally

- (UIImage *_Nonnull)flipImageHorizontally
Discussion

Flip the image horizontally

Return Value

Returns the flipped image

Declared In

UIImage+BFKit.h

flipImageVertically

- (UIImage *_Nonnull)flipImageVertically
Discussion

Flip the image vertically

Return Value

Returns the flipped image

Declared In

UIImage+BFKit.h

hasAlpha

- (BOOL)hasAlpha
Discussion

Check if the image has alpha

Return Value

Returns YES if has alpha, NO if not

Declared In

UIImage+BFKit.h

imageAtRect:

- (UIImage *_Nonnull)imageAtRect:(CGRect)rect
Discussion

Create an image from a given rect of self

Parameters

rect

Rect to take the image

Return Value

Returns the image from a given rect

Declared In

UIImage+BFKit.h

imageByScalingProportionallyToMaximumSize:

- (UIImage *_Nonnull)imageByScalingProportionallyToMaximumSize:(CGSize)targetSize
Discussion

Scale the image to the maxinum given size

Parameters

maxSize

The site to scale to

Return Value

Returns the scaled image

Declared In

UIImage+BFKit.h

imageByScalingProportionallyToMinimumSize:

- (UIImage *_Nonnull)imageByScalingProportionallyToMinimumSize:(CGSize)targetSize
Discussion

Scale the image to the minimum given size

Parameters

targetSize

The site to scale to

Return Value

Returns the scaled image

Declared In

UIImage+BFKit.h

imageByScalingProportionallyToSize:

- (UIImage *_Nonnull)imageByScalingProportionallyToSize:(CGSize)targetSize
Discussion

Scale the image proportionally to the given size

Parameters

targetSize

The site to scale to

Return Value

Returns the scaled image

Declared In

UIImage+BFKit.h

imageByScalingToSize:

- (UIImage *_Nonnull)imageByScalingToSize:(CGSize)targetSize
Discussion

Scele the iamge to the given size

Parameters

targetSize

The site to scale to

Return Value

Returns the scaled image

Declared In

UIImage+BFKit.h

imageRotatedByDegrees:

- (UIImage *_Nonnull)imageRotatedByDegrees:(CGFloat)degrees
Discussion

Rotate the image to the given degrees

Parameters

radians

Degrees to rotate to

Return Value

Returns the rotated image

Declared In

UIImage+BFKit.h

imageRotatedByRadians:

- (UIImage *_Nonnull)imageRotatedByRadians:(CGFloat)radians
Discussion

Rotate the image to the given radians

Parameters

radians

Radians to rotate to

Return Value

Returns the rotated image

Declared In

UIImage+BFKit.h

imageToBlackAndWhite

- (UIImage *_Nonnull)imageToBlackAndWhite
Discussion

Transform the image to black and white

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

imageToGrayscale

- (UIImage *_Nonnull)imageToGrayscale
Discussion

Transform the image to grayscale

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

invertColors

- (UIImage *_Nonnull)invertColors
Discussion

Invert the color of the image

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h

isGrayscale

- (BOOL)isGrayscale
Discussion

Check if the image is in grayscale

Return Value

Returns YES if is in grayscale, NO if not

Declared In

UIImage+BFKit.h

maskWithImage:

- (UIImage *_Nullable)maskWithImage:(UIImage *_Nonnull)image
Discussion

Mask self with another image

Parameters

image

Mask image

Return Value

Returns the masked image

Declared In

UIImage+BFKit.h

maskWithImage:andSize:

- (UIImage *_Nullable)maskWithImage:(UIImage *_Nonnull)image andSize:(CGSize)size
Discussion

Mask self with another image and size

Parameters

image

Mask image

size

Mask size

Return Value

Returns the masked image

Declared In

UIImage+BFKit.h

removeAlpha

- (UIImage *_Nonnull)removeAlpha
Discussion

Remove the alpha of the image

Return Value

Returns the image without alpha

Declared In

UIImage+BFKit.h

sepiaToneWithIntensity:

- (UIImage *_Nonnull)sepiaToneWithIntensity:(float)intensity
Discussion

Apply the sepia filter to the image

Parameters

intensity

Intensity of the filter

Return Value

Returns the transformed image

Declared In

UIImage+BFKit.h