BMXImageAttachment Class Reference

Inherits from BMXFileAttachment :
BMXMessageAttachment :
NSObject
Declared in BMXImageAttachment.h

Properties

pictureSize

@property (nonatomic) CGSize pictureSize

thumbnailDownLoadStatus

@property (nonatomic, assign) BMXAttachmentDownloadStatus thumbnailDownLoadStatus

thumbnailFileLength

@property (nonatomic, assign) long long thumbnailFileLength

thumbnailPath

@property (nonatomic, copy) NSString *thumbnailPath

thumbnailSize

@property (nonatomic) CGSize thumbnailSize

Instance Methods

initWithData:thumbnailData:imageSize:conversationId:

- (instancetype)initWithData:(NSData *)*aData* thumbnailData:(NSData *)*aThumbnailData* imageSize:(CGSize)*imageSize* conversationId:(NSString *)*conversationId*

Example:

alertView.btnClickBlock = ^{
        
    UIImage *image = contentImg;
    NSData *imageData = UIImageJPEGRepresentation(image,1.0f);
    NSData *thumImageData =  UIImageJPEGRepresentation(image,1.0f);
    BMXImageAttachment *imageAttachment = [[BMXImageAttachment alloc] initWithData:imageData thumbnailData:thumImageData imageSize:image.size conversationId:[NSString stringWithFormat:@"%lld",group.groupId]];
    break;
}
case MessageBodyType_Image: {
    UIImage *image = (UIImage *)content;
    messageModel.width = image.size.width;
    messageModel.height = image.size.height;
    [SDImageCache.sharedImageCache storeImage:image forKey:messageModel.date completion:nil];
            
    NSData *imageData = UIImageJPEGRepresentation(image,1.0f);
    NSData *thumImageData =  UIImageJPEGRepresentation(image,1.0f);
    BMXImageAttachment *imageAttachment = [[BMXImageAttachment alloc] initWithData:imageData thumbnailData:thumImageData imageSize:image.size conversationId:[NSString stringWithFormat:@"%ld",(long)self.conversationId]];
alertView.btnClickBlock = ^{
        
        UIImage *image = contentImg;
        NSData *imageData = UIImageJPEGRepresentation(image,1.0f);
        NSData *thumImageData =  UIImageJPEGRepresentation(image,1.0f);
        BMXImageAttachment *imageAttachment = [[BMXImageAttachment alloc] initWithData:imageData thumbnailData:thumImageData imageSize:image.size conversationId:[NSString stringWithFormat:@"%lld",roster.rosterId]];

initWithLocalPath:thumbnailPath:size:displayName:conversationId:

- (instancetype)initWithLocalPath:(NSString *)*aLocalPath* thumbnailPath:(NSString *)*aThumbnailPath* size:(CGSize)*size* displayName:(NSString *)*aDisplayName* conversationId:(NSString *)*conversationId*

Example:

setReceiveThumbnailUrl:thumbnailSize:fileLength:

设置接收图片消息缩略图

- (void)setReceiveThumbnailUrl:(NSString *)*url* thumbnailSize:(CGSize)*thumbnailSize* fileLength:(long long)*fileLength*

Discussion

设置接收图片消息缩略图

Declared In

  • BMXImageAttachment.h

Example:

setsendThumbnailPath:

设置发送图片消息缩略图

- (void)setsendThumbnailPath:(NSString *)*path*

Discussion

设置发送图片消息缩略图

Declared In

  • BMXImageAttachment.h

Example:

© 2019-2022 美信拓扑 | 官网 该文件修订时间: 2022-09-21 11:43:07

results matching ""

    No results matching ""