I have found the very simple solution to resize an image (of the pdf page) without loosing resolution:
https://stackoverflow.com/questions/32612760/resize-image-without-losing-quality
I copy the code for those who are interested and to thank the author @Henry Declety:
extension UIImage {
func resize(targetSize: CGSize) -> UIImage {
return UIGraphicsImageRenderer(size:targetSize).image { _ in
self.draw(in: CGRect(origin: .zero, size: targetSize))
}
}
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: