session-ios/SignalServiceKit/src/Util/NSData+Image.h
2018-12-18 10:53:41 -05:00

18 lines
549 B
Objective-C

//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
@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;
// Returns CGSizeZero on error.
+ (CGSize)imageSizeForFilePath:(NSString *)filePath mimeType:(NSString *)mimeType;
@end