Signal-iOS/SignalServiceKit/src/Util/UIImage+OWS.h
2019-11-04 14:06:54 -08:00

28 lines
811 B
Objective-C

//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@interface UIImage (normalizeImage)
- (UIImage *)normalizedImage;
- (UIImage *)resizedWithQuality:(CGInterpolationQuality)quality rate:(CGFloat)rate;
- (nullable UIImage *)resizedWithMaxDimensionPoints:(CGFloat)maxDimensionPoints;
- (nullable UIImage *)resizedWithMaxDimensionPixels:(CGFloat)maxDimensionPixels;
- (nullable UIImage *)resizedImageToSize:(CGSize)dstSize;
- (UIImage *)resizedImageToFillPixelSize:(CGSize)boundingSize;
+ (UIImage *)imageWithColor:(UIColor *)color;
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
+ (nullable NSData *)validJpegDataFromAvatarData:(NSData *)avatarData;
- (size_t)pixelWidth;
- (size_t)pixelHeight;
- (CGSize)pixelSize;
@end
NS_ASSUME_NONNULL_END