Update Ghostgram features

This commit is contained in:
ichmagmaus 812
2026-03-07 18:19:16 +01:00
parent 32b0dddcd9
commit 13a43b9068
902 changed files with 148295 additions and 62348 deletions
@@ -1,3 +1,4 @@
import SGSimpleSettings
import Foundation
import UIKit
import Photos
@@ -182,7 +183,7 @@ public func fetchPhotoLibraryResource(localIdentifier: String, width: Int32?, he
defer {
TempBox.shared.dispose(tempFile)
}
if let scaledImage = scaledImage, let data = compressImageToJPEG(scaledImage, quality: 0.6, tempFilePath: tempFile.path) {
if let scaledImage = scaledImage, let data = compressImageToJPEG(scaledImage, quality: Float(SGSimpleSettings.shared.outgoingPhotoQuality) / 100.0, tempFilePath: tempFile.path) {
#if DEBUG
print("compression completion \((CACurrentMediaTime() - startTime) * 1000.0) ms")
#endif
@@ -192,7 +193,7 @@ public func fetchPhotoLibraryResource(localIdentifier: String, width: Int32?, he
subscriber.putCompletion()
}
case .jxl:
if let scaledImage = scaledImage, let data = compressImageToJPEGXL(scaledImage, quality: Int(quality ?? 75)) {
if let scaledImage = scaledImage, let data = compressImageToJPEGXL(scaledImage, quality: Int(SGSimpleSettings.shared.outgoingPhotoQuality)) {
#if DEBUG
print("jpegxl compression completion \((CACurrentMediaTime() - startTime) * 1000.0) ms")
#endif