SelfieCam/SelfieCam/Shared/Models/PhotoQuality.swift

40 lines
921 B
Swift

//
// PhotoQuality.swift
// CameraTester
//
// Created by Matt Bruce on 1/3/26.
//
import SwiftUI
// Photo quality settings
enum PhotoQuality: String, CaseIterable, Codable {
case high = "High"
case medium = "Medium"
case low = "Low"
var compressionQuality: CGFloat {
switch self {
case .high: return 0.9 // 90% quality - best for sharing/printing
case .medium: return 0.75 // 75% quality - balanced
case .low: return 0.5 // 50% quality - small file size
}
}
var icon: String {
switch self {
case .high: return "star.fill"
case .medium: return "star.leadinghalf.filled"
case .low: return "star"
}
}
var description: String {
switch self {
case .high: return "High Quality"
case .medium: return "Medium Quality"
case .low: return "Low Quality"
}
}
}