Implement progressive JPEG for photos

This commit is contained in:
Ali
2020-07-28 17:39:34 +04:00
parent 6f731d3b63
commit e1432e4171
562 changed files with 168453 additions and 188 deletions

View File

@@ -313,7 +313,7 @@ final class HorizontalListContextResultsChatInputPanelItemNode: ListViewItemNode
if let stickerFile = stickerFile {
updateImageSignal = chatMessageSticker(account: item.account, file: stickerFile, small: false, fetched: true)
} else {
let tmpRepresentation = TelegramMediaImageRepresentation(dimensions: PixelDimensions(CGSize(width: fittedImageDimensions.width * 2.0, height: fittedImageDimensions.height * 2.0)), resource: imageResource)
let tmpRepresentation = TelegramMediaImageRepresentation(dimensions: PixelDimensions(CGSize(width: fittedImageDimensions.width * 2.0, height: fittedImageDimensions.height * 2.0)), resource: imageResource, progressiveSizes: [])
let tmpImage = TelegramMediaImage(imageId: MediaId(namespace: 0, id: 0), representations: [tmpRepresentation], immediateThumbnailData: nil, reference: nil, partialReference: nil, flags: [])
updateImageSignal = chatMessagePhoto(postbox: item.account.postbox, photoReference: .standalone(media: tmpImage), synchronousLoad: true)
}