mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
692 B
C
25 lines
692 B
C
5 years ago
|
#import <UIKit/UIKit.h>
|
||
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
|
@interface NSData (Image)
|
||
|
|
||
|
// If mimeType is non-nil, we ensure that the magic numbers agree with the
|
||
|
// mimeType.
|
||
|
+ (BOOL)ows_isValidImageAtPath:(NSString *)filePath;
|
||
|
+ (BOOL)ows_isValidImageAtPath:(NSString *)filePath mimeType:(nullable NSString *)mimeType;
|
||
|
- (BOOL)ows_isValidImage;
|
||
|
- (BOOL)ows_isValidImageWithMimeType:(nullable NSString *)mimeType;
|
||
|
- (NSString *_Nullable)ows_guessMimeType;
|
||
|
|
||
|
// Returns the image size in pixels.
|
||
|
//
|
||
|
// Returns CGSizeZero on error.
|
||
|
+ (CGSize)imageSizeForFilePath:(NSString *)filePath mimeType:(NSString *)mimeType;
|
||
|
|
||
|
+ (BOOL)hasAlphaForValidImageFilePath:(NSString *)filePath;
|
||
|
|
||
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|