Fixes #980 - Generated thumbnail size when uploading media (#1613)

This commit is contained in:
Stefan Ceriu
2023-09-01 14:58:36 +03:00
committed by GitHub
parent 38d6ffb363
commit d90d7adb21
3 changed files with 16 additions and 10 deletions
@@ -319,7 +319,7 @@ struct MediaUploadingPreprocessor {
/// - targetSize: maximum resulting size
/// - Returns: the resized image
private func resizeImage(withSource imageSource: CGImageSource, targetSize: CGSize) async -> Result<UIImage, MediaUploadingPreprocessorError> {
let maximumSize = min(targetSize.height, targetSize.width)
let maximumSize = max(targetSize.height, targetSize.width)
let options: [NSString: Any] = [
// The maximum width and height in pixels of a thumbnail.