Experimental gigapixel image support

This commit is contained in:
Ali
2020-04-21 22:24:03 +04:00
parent 2b9347a3e5
commit c97bc29a20
3 changed files with 329 additions and 26 deletions

View File

@@ -183,7 +183,7 @@ public func galleryItemForEntry(context: AccountContext, presentationData: Prese
if let dimensions = file.dimensions {
pixelsCount = Int(dimensions.width) * Int(dimensions.height)
}
if (file.size == nil || file.size! < 4 * 1024 * 1024) && pixelsCount < 4096 * 4096 {
if true /*(file.size == nil || file.size! < 4 * 1024 * 1024) && pixelsCount < 4096 * 4096*/ {
return ChatImageGalleryItem(context: context, presentationData: presentationData, message: message, location: location, performAction: performAction, openActionOptions: openActionOptions)
} else {
return ChatDocumentGalleryItem(context: context, presentationData: presentationData, message: message, location: location)