NIMImageObject Class Reference
Inherits from | NSObject |
---|---|
Conforms to | NIMMessageObject |
Declared in | NIMImageObject.h |
– initWithImage:
Image object initialization method
- (instancetype)initWithImage:(UIImage *)image
Parameters
image |
Image to be sent |
---|
Return Value
image object
Discussion
Image object initialization method
Declared In
NIMImageObject.h
– initWithFilepath:
Image object initialization method
- (instancetype)initWithFilepath:(NSString *)filepath
Parameters
filepath |
Image path |
---|
Return Value
image object
Discussion
Image object initialization method
This method uploads the original image without compression. In iOS 11, Apple has adopted a new image format HEIC. If the original image is used, it will cause compatibility issues on other devices. Make the format conversion at the upper layer for compatibility.
Declared In
NIMImageObject.h
– initWithData:extension:
Image object initialization method
- (instancetype)initWithData:(NSData *)data extension:(NSString *)extension
Parameters
data |
image data |
---|---|
extension |
recommended image extension |
Return Value
image object
Discussion
Image object initialization method
Declared In
NIMImageObject.h
– initWithImage:scene:
Image object initialization method
- (instancetype)initWithImage:(UIImage *)image scene:(NSString *)scene
Parameters
image |
Image to be sent |
---|---|
scene |
scenario type |
Return Value
image object
Discussion
Image object initialization method
Declared In
NIMImageObject.h
– initWithFilepath:scene:
Image object initialization method
- (instancetype)initWithFilepath:(NSString *)filepath scene:(NSString *)scene
Parameters
filepath |
Image path |
---|---|
scene |
scenario type |
Return Value
image object
Discussion
Image object initialization method
This method uploads the original image without compression. In iOS 11, Apple has adopted a new image format HEIC. If the original image is used, it will cause compatibility issues on other devices. Make the format conversion at the upper layer for compatibility.
Declared In
NIMImageObject.h
– initWithFilepath:scene:size:
Image object initialization method. WebP images are supprted
- (instancetype)initWithFilepath:(NSString *)filepath scene:(NSString *)scene size:(CGSize)size
Parameters
filepath |
Image path |
---|---|
scene |
scenario type |
size |
The width and height of an image. Pass in the original dimension for WebP files |
Return Value
image object
Discussion
Image object initialization method. WebP images are supprted
This method uploads the original image without compression. In iOS 11, Apple has adopted a new image format HEIC. If the original image is used, it will cause compatibility issues on other devices. Make the format conversion at the upper layer for compatibility.
Declared In
NIMImageObject.h
– initWithData:extension:scene:
Image object initialization method
- (instancetype)initWithData:(NSData *)data extension:(NSString *)extension scene:(NSString *)scene
Parameters
data |
image data |
---|---|
extension |
recommended image extension |
scene |
scenario type |
Return Value
image object
Discussion
Image object initialization method
Declared In
NIMImageObject.h
– initWithData:extension:scene:size:
Image object initialization method. WebP images are supprted
- (instancetype)initWithData:(NSData *)data extension:(NSString *)extension scene:(NSString *)scene size:(CGSize)size
Parameters
data |
image data |
---|---|
extension |
recommended image extension |
scene |
scenario type |
size |
The width and height of an image. Pass in the original dimension for WebP files |
Return Value
image object
Discussion
Image object initialization method. WebP images are supprted
Declared In
NIMImageObject.h
– setUploadURL:
Set a URL for uploaded resources
- (void)setUploadURL:(NSString *)urlString
Parameters
urlString |
URL for an image |
---|
Discussion
Set a URL for uploaded resources
Declared In
NIMImageObject.h
displayName
Display name
@property (nullable, nonatomic, copy) NSString *displayName
Discussion
Display name
Declared In
NIMImageObject.h
path
Local file path of an image
@property (nullable, nonatomic, copy, readonly) NSString *path
Discussion
Local file path of an image
The SDK does not provide a method for downloading large images, we recommend you use this address for image download. An application can use the download class or SDWebImage to download and manage images.
Declared In
NIMImageObject.h
size
Image dimension
@property (nonatomic, assign, readonly) CGSize size
Discussion
Image dimension
Declared In
NIMImageObject.h
option
Image option
@property (nullable, nonatomic, strong) NIMImageOption *option
Declared In
NIMImageObject.h
md5
MD5 value of an image
@property (nullable, nonatomic, copy, readonly) NSString *md5
Discussion
MD5 value of an image
Declared In
NIMImageObject.h