```swift
import SwiftUI
import PhotosUI
struct ImagePickerView: UIViewControllerRepresentable {
@Binding var image: UIImage //处理后的图片
@Binding var showPicker: Bool
@Binding var originImage: UIImage //选中的原图
@Binding var selectType: FaceMosaicType
var selectionLimit: Int //选择的图片的数量的限制
func makeUIViewController(context: Context) -> some UIViewController {
var config = PHPickerConfiguration()
config.filter = .images //可以选择的类型
config.selectionLimit = selectionLimit
let picker = PHPickerViewController(configuration: config)
picker.delegate = context.coordinator
return picker
}
func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { }
func makeCoordinator() -> Coordinator {
Coordin