UIImage(MBImageScaling) Category Reference
| Declared in | UIImage+MBImageScaling.h |
|---|
Scaling images to a specific size
– imageScaledToSize:quality:
Scales the receiver to the specified size.
- (nonnull UIImage *)imageScaledToSize:(CGSize)newSize quality:(CGInterpolationQuality)qualityParameters
newSize |
The size of the |
|---|---|
quality |
The interpolation quality to use for scaling the image. |
Return Value
The resulting image.
Declared In
UIImage+MBImageScaling.h
– imageScaledToSize:
Scales the receiver to the specified size.
- (nonnull UIImage *)imageScaledToSize:(CGSize)newSizeParameters
newSize |
The size of the |
|---|
Return Value
The resulting image.
Discussion
Scaling will be performed using the kCGInterpolationDefault interpolation
quality.
Declared In
UIImage+MBImageScaling.h
Scaling images by a percentage of the original
– imageScaledByFactor:quality:
Scales the receiver to a new size by applying the specified scale factor.
- (nonnull UIImage *)imageScaledByFactor:(CGFloat)scale quality:(CGInterpolationQuality)qualityParameters
scale |
The scale factor that determines the size of the returned
image. Numbers less than |
|---|---|
quality |
The interpolation quality to use for scaling the image. |
Return Value
The resulting image.
Discussion
The new size is determined by multiplying the width and height by the scale factor.
Declared In
UIImage+MBImageScaling.h
– imageScaledByFactor:
Scales the receiver to a new size by applying the specified scale factor.
- (nonnull UIImage *)imageScaledByFactor:(CGFloat)scaleParameters
scale |
The scale factor that determines the size of the returned
image. Numbers less than |
|---|
Return Value
The resulting image.
Discussion
The new size is determined by multiplying the width and height by the scale factor.
Scaling will be performed using the kCGInterpolationDefault interpolation
quality.
Declared In
UIImage+MBImageScaling.h