agora_chat_SDK
3.8.2
|
#import <ImageMessageBody.h>
Instance Methods | |
(instancetype) | - initWithData:thumbnailData: |
(CGFloat compressRatio) | - __deprecated_msg |
Properties | |
CGSize | size |
CGFloat | compressionRatio |
NSString * | thumbnailDisplayName |
NSString * | thumbnailLocalPath |
NSString * | thumbnailRemotePath |
NSString * | thumbnailSecretKey |
CGSize | thumbnailSize |
long long | thumbnailFileLength |
AgoraDownloadStatus | thumbnailDownloadStatus |
ImageMessageBody.h Image message body class
Image message body -(instancetype)initWithData:displayName: or -(instancetype)initWithData:thumbnailData: Note: SDK will compress the image based on the attribute compressRatio when delivering the image
- (CGFloat compressRatio) __deprecated_msg | ("Use - compressionRatio instead") |
Image compression ratio. 1.0 without compression, default value is 0.6. SDK uses the default value if the given value is less than zero.
- (instancetype) initWithData: | (NSData *) | aData | |
thumbnailData: | (NSData *) | aThumbnailData | |
Initialize an image message body instance
Image receiver will receive object thumbnail that generated based on sender's aData object. Adjust thumbnail resolution on Hyphenate conosle -> "Thumbnail Size" -> width and height. Unit in px. ex. aData resolution 200 x 400 (1:2), thumbnail resolution setting (width x height) 200 x 200, then will generate thumbnail in 100 x 200 ex. aData resolution 600 x 300 (2:1), thumbnail resolution setting (width x height) 200 x 200, then will generate thumbnail in 200 x 100
Image sender can obtain thumbnail from thumbnailLocalPath Image receiver will get thumbnail stored under thumbnailRemotePath after a successful download automatically. However, if the automatic downloading failed, use the following method, downloadMessageThumbnail:progress:completion:
aData | original image object in NSData format |
aThumbnailData | Thumbnail in NSData format. Will not push to server, but only for local usage |
|
readwritenonatomicassign |
SDK will compress the image based on the attribute compressRatio when delivering the image Image compression ratio. 1.0x is original image without compression , default value is 0.6x (60% compression). SDK uses the default value if the given value is less than zero.
|
readwritenonatomicassign |
Resolution of the image
|
readwritenonatomiccopy |
Display name of thumbnail
|
readwritenonatomicassign |
Download status of a thumbnail
|
readwritenonatomicassign |
File size of a thumbnail, in bytes
|
readwritenonatomiccopy |
Local path of thumbnail UIImage *image = [UIImage imageWithContentsOfFile:thumbnailLocalPath];
|
readwritenonatomiccopy |
Server url path of thumbnail
|
readwritenonatomiccopy |
Secret key for thumbnail image, a key is required for verification when downloading thumbnail
|
readwritenonatomicassign |
Resolution of the thumbnail