Version 11.9

This commit is contained in:
Kylmakalle
2024-07-02 19:58:37 +03:00
parent 587ac7bf00
commit 833ecbc777
797 changed files with 40411 additions and 2895 deletions

View File

@@ -1,3 +1,4 @@
import SGSimpleSettings
import Foundation
import UIKit
import TelegramCore
@@ -169,7 +170,8 @@ public func transformOutgoingMessageMedia(postbox: Postbox, network: Network, me
defer {
TempBox.shared.dispose(tempFile)
}
if let fullImage = UIImage(contentsOfFile: data.path), let smallestImage = generateScaledImage(image: fullImage, size: smallestSize, scale: 1.0), let smallestData = compressImageToJPEG(smallestImage, quality: 0.7, tempFilePath: tempFile.path) {
// MARK: Swiftgram
if let fullImage = UIImage(contentsOfFile: data.path), let smallestImage = generateScaledImage(image: fullImage, size: smallestSize, scale: 1.0), let smallestData = compressImageToJPEG(smallestImage, quality: Float(SGSimpleSettings.shared.outgoingPhotoQuality) / 100.0, tempFilePath: tempFile.path) {
var representations = image.representations
let thumbnailResource = LocalFileMediaResource(fileId: Int64.random(in: Int64.min ... Int64.max))