Skip to content

Commit

Permalink
Decrease the max crop size (#444)
Browse files Browse the repository at this point in the history
Co-authored-by: etoledom <[email protected]>
  • Loading branch information
pinarol and etoledom authored Oct 3, 2024
1 parent db18b84 commit da9c11b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Gravatar/Network/Services/ImageUploadService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct ImageUploadService: ImageUploader {

@discardableResult
func uploadImage(_ image: UIImage, accessToken: String, additionalHTTPHeaders: [HTTPHeaderField]?) async throws -> (data: Data, response: HTTPURLResponse) {
guard let data = image.jpegData(compressionQuality: 0.9) else {
guard let data = image.jpegData(compressionQuality: 0.8) else {
throw ImageUploadError.cannotConvertImageIntoData
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ImageCropperViewController: UIViewController, UIScrollViewDelegate {
private enum Constants {
static let backgroundColor = UIColor.black
static let croperFrameSize: CGFloat = 320
static let maxOutputImageSizeInPixels: CGFloat = 2048
static let maxOutputImageSizeInPixels: CGFloat = 1280
}

// ScrollView for zooming and panning
Expand Down

0 comments on commit da9c11b

Please sign in to comment.