Revert "improve attachment image quality"
This reverts commit ad4e65e6e1
.
This commit is contained in:
parent
ad4e65e6e1
commit
b315510ec2
|
@ -388,7 +388,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
||||||
owsFailDebug("couldn't load asset.")
|
owsFailDebug("couldn't load asset.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let attachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: rendition.utiType, imageQuality: .high)
|
let attachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: rendition.utiType, imageQuality: .medium)
|
||||||
|
|
||||||
strongSelf.dismiss(animated: true) {
|
strongSelf.dismiss(animated: true) {
|
||||||
// Delegate presents view controllers, so it's important that *this* controller be dismissed before that occurs.
|
// Delegate presents view controllers, so it's important that *this* controller be dismissed before that occurs.
|
||||||
|
|
|
@ -396,7 +396,7 @@ extension PhotoCapture: CaptureOutputDelegate {
|
||||||
|
|
||||||
let dataSource = DataSourceValue.dataSource(with: photoData, utiType: kUTTypeJPEG as String)
|
let dataSource = DataSourceValue.dataSource(with: photoData, utiType: kUTTypeJPEG as String)
|
||||||
|
|
||||||
let attachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: kUTTypeJPEG as String, imageQuality: .high)
|
let attachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: kUTTypeJPEG as String, imageQuality: .medium)
|
||||||
delegate?.photoCapture(self, didFinishProcessingAttachment: attachment)
|
delegate?.photoCapture(self, didFinishProcessingAttachment: attachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ class PhotoCollectionContents {
|
||||||
switch asset.mediaType {
|
switch asset.mediaType {
|
||||||
case .image:
|
case .image:
|
||||||
return requestImageDataSource(for: asset).map { (dataSource: DataSource, dataUTI: String) in
|
return requestImageDataSource(for: asset).map { (dataSource: DataSource, dataUTI: String) in
|
||||||
return SignalAttachment.attachment(dataSource: dataSource, dataUTI: dataUTI, imageQuality: .high)
|
return SignalAttachment.attachment(dataSource: dataSource, dataUTI: dataUTI, imageQuality: .medium)
|
||||||
}
|
}
|
||||||
case .video:
|
case .video:
|
||||||
return requestVideoDataSource(for: asset).map { (dataSource: DataSource, dataUTI: String) in
|
return requestVideoDataSource(for: asset).map { (dataSource: DataSource, dataUTI: String) in
|
||||||
|
|
|
@ -75,7 +75,6 @@ public enum TSImageQualityTier: UInt {
|
||||||
@objc
|
@objc
|
||||||
public enum TSImageQuality: UInt {
|
public enum TSImageQuality: UInt {
|
||||||
case original
|
case original
|
||||||
case high
|
|
||||||
case medium
|
case medium
|
||||||
case compact
|
case compact
|
||||||
|
|
||||||
|
@ -83,8 +82,6 @@ public enum TSImageQuality: UInt {
|
||||||
switch self {
|
switch self {
|
||||||
case .original:
|
case .original:
|
||||||
return .original
|
return .original
|
||||||
case .high:
|
|
||||||
return .high
|
|
||||||
case .medium:
|
case .medium:
|
||||||
return .mediumHigh
|
return .mediumHigh
|
||||||
case .compact:
|
case .compact:
|
||||||
|
|
|
@ -552,7 +552,7 @@ final class ShareVC : UINavigationController, ShareViewDelegate, AppModeManagerD
|
||||||
return promise
|
return promise
|
||||||
}
|
}
|
||||||
|
|
||||||
let attachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: specificUTIType, imageQuality: .high)
|
let attachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: specificUTIType, imageQuality: .medium)
|
||||||
if loadedItem.isConvertibleToContactShare {
|
if loadedItem.isConvertibleToContactShare {
|
||||||
Logger.info("isConvertibleToContactShare")
|
Logger.info("isConvertibleToContactShare")
|
||||||
attachment.isConvertibleToContactShare = true
|
attachment.isConvertibleToContactShare = true
|
||||||
|
|
|
@ -623,7 +623,7 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
|
||||||
}
|
}
|
||||||
dataSource.sourceFilename = filename
|
dataSource.sourceFilename = filename
|
||||||
|
|
||||||
let dstAttachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: dataUTI, imageQuality: .high)
|
let dstAttachment = SignalAttachment.attachment(dataSource: dataSource, dataUTI: dataUTI, imageQuality: .medium)
|
||||||
if let attachmentError = dstAttachment.error {
|
if let attachmentError = dstAttachment.error {
|
||||||
owsFailDebug("Could not prepare attachment for output: \(attachmentError).")
|
owsFailDebug("Could not prepare attachment for output: \(attachmentError).")
|
||||||
return attachmentItem.attachment
|
return attachmentItem.attachment
|
||||||
|
|
Loading…
Reference in New Issue