diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m index bb70fb11f..521630e6a 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m @@ -855,7 +855,7 @@ NS_ASSUME_NONNULL_BEGIN < kMaxCachableSize; stillImageView.image = [strongSelf tryToLoadCellMedia:^{ OWSCAssert([strongSelf.attachmentStream isImage]); - return strongSelf.attachmentStream.image; + return strongSelf.attachmentStream.originalImage; } mediaView:stillImageView cacheKey:strongSelf.attachmentStream.uniqueId @@ -979,7 +979,7 @@ NS_ASSUME_NONNULL_BEGIN stillImageView.image = [strongSelf tryToLoadCellMedia:^{ OWSCAssert([strongSelf.attachmentStream isVideo]); - return strongSelf.attachmentStream.image; + return strongSelf.attachmentStream.originalImage; } mediaView:stillImageView cacheKey:strongSelf.attachmentStream.uniqueId diff --git a/Signal/src/ViewControllers/MediaDetailViewController.m b/Signal/src/ViewControllers/MediaDetailViewController.m index 008a1179c..6b232cab6 100644 --- a/Signal/src/ViewControllers/MediaDetailViewController.m +++ b/Signal/src/ViewControllers/MediaDetailViewController.m @@ -73,7 +73,7 @@ NS_ASSUME_NONNULL_BEGIN _galleryItemBox = galleryItemBox; _viewItem = viewItem; // We cache the image data in case the attachment stream is deleted. - _image = galleryItemBox.attachmentStream.image; + _image = galleryItemBox.attachmentStream.originalImage; return self; } diff --git a/Signal/src/ViewControllers/MediaGalleryViewController.swift b/Signal/src/ViewControllers/MediaGalleryViewController.swift index 6a63a548e..903511ead 100644 --- a/Signal/src/ViewControllers/MediaGalleryViewController.swift +++ b/Signal/src/ViewControllers/MediaGalleryViewController.swift @@ -43,7 +43,7 @@ public struct MediaGalleryItem: Equatable, Hashable { } var fullSizedImage: UIImage { - guard let image = attachmentStream.image() else { + guard let image = attachmentStream.originalImage() else { owsFail("\(logTag) in \(#function) unexpectedly unable to build attachment image") return UIImage() } diff --git a/SignalMessaging/ViewModels/OWSQuotedReplyModel.m b/SignalMessaging/ViewModels/OWSQuotedReplyModel.m index 6ebd3e143..6c355c348 100644 --- a/SignalMessaging/ViewModels/OWSQuotedReplyModel.m +++ b/SignalMessaging/ViewModels/OWSQuotedReplyModel.m @@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN TSAttachmentStream *attachmentStream; if ([attachment isKindOfClass:[TSAttachmentStream class]]) { attachmentStream = (TSAttachmentStream *)attachment; - thumbnailImage = attachmentStream.image; + thumbnailImage = attachmentStream.originalImage; } } else if (attachmentInfo.thumbnailAttachmentPointerId) { // download failed, or hasn't completed yet. diff --git a/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m b/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m index 98a3ded81..c8bff39ad 100644 --- a/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m +++ b/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m @@ -191,7 +191,7 @@ NSString *const TSGroupThread_NotificationKey_UniqueId = @"TSGroupThread_Notific OWSAssert(attachmentStream); OWSAssert(transaction); - self.groupModel.groupImage = [attachmentStream image]; + self.groupModel.groupImage = [attachmentStream originalImage]; [self saveWithTransaction:transaction]; [transaction addCompletionQueue:nil diff --git a/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.h b/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.h index 0dcfa51d5..ddf2887c0 100644 --- a/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.h +++ b/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) NSDate *creationTimestamp; #if TARGET_OS_IPHONE -- (nullable UIImage *)image; +- (nullable UIImage *)originalImage; - (nullable UIImage *)thumbnailImage; - (nullable NSData *)thumbnailData; - (nullable NSData *)validStillImageData; diff --git a/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m b/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m index cd619cbcc..f2f019d05 100644 --- a/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m +++ b/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m @@ -333,7 +333,7 @@ const CGFloat kMaxVideoStillSize = 1 * 1024; #pragma mark - -- (nullable UIImage *)image +- (nullable UIImage *)originalImage { if ([self isVideo]) { return [self videoStillImage];