NIMImageObject Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | NIMMessageObject |
| Declared in | NIMImageObject.h |
– initWithImage:
Image object initialization method
- (instancetype)initWithImage:(UIImage *)imageParameters
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 *)filepathParameters
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 *)extensionParameters
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 *)sceneParameters
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 *)sceneParameters
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)sizeParameters
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 *)sceneParameters
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)sizeParameters
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 *)urlStringParameters
urlString |
URL for an image |
|---|
Discussion
Set a URL for uploaded resources
Declared In
NIMImageObject.h
displayName
Display name
@property (nullable, nonatomic, copy) NSString *displayNameDiscussion
Display name
Declared In
NIMImageObject.h
path
Local file path of an image
@property (nullable, nonatomic, copy, readonly) NSString *pathDiscussion
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 sizeDiscussion
Image dimension
Declared In
NIMImageObject.h
option
Image option
@property (nullable, nonatomic, strong) NIMImageOption *optionDeclared In
NIMImageObject.h
md5
MD5 value of an image
@property (nullable, nonatomic, copy, readonly) NSString *md5Discussion
MD5 value of an image
Declared In
NIMImageObject.h