Implement image comparison command

This commit is contained in:
Christoph Hagen
2025-01-05 20:16:16 +01:00
parent 29bba5e76e
commit ac7fbdd638
23 changed files with 200 additions and 40 deletions

View File

@ -164,14 +164,15 @@ final class FileResource: Item {
return prefix + "." + ext
}
func imageSet(width: Int, height: Int, language: ContentLanguage, quality: CGFloat = 0.7) -> ImageSet {
func imageSet(width: Int, height: Int, language: ContentLanguage, quality: CGFloat = 0.7, extraAttributes: String? = nil) -> ImageSet {
let description = self.localized(in: language)
return .init(
image: self,
maxWidth: width,
maxHeight: height,
description: description,
quality: quality)
quality: quality,
extraAttributes: extraAttributes)
}
func imageVersion(width: Int, height: Int, type: FileType) -> ImageVersion {