mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-08-24 06:42:32 +02:00
Update Ghostgram features
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user