DEVTOOLS-186 Exporter les images de resgen en svg
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
gitea-openium/resgen.swift/pipeline/pr-master There was a failure building this commit

This commit is contained in:
2024-04-22 12:05:24 +02:00
parent d4afa9c9e9
commit 2357a40fff
6 changed files with 194 additions and 47 deletions

View File

@ -38,11 +38,21 @@ class ImageFileParser {
}
return Int(splittedLine[3])!
}()
let image = ParsedImage(name: String(splittedLine[1]), tags: String(splittedLine[0]), width: width, height: height)
var imageExtensions: [ImageExtension] = []
splittedLine.forEach { stringExtension in
if let imageExtension = ImageExtension(rawValue: String(stringExtension)) {
imageExtensions.append(imageExtension)
}
}
let image = ParsedImage(name: String(splittedLine[1]), tags: String(splittedLine[0]), width: width, height: height, imageExtensions: imageExtensions)
imagesToGenerate.append(image)
}
print(imagesToGenerate)
return imagesToGenerate.filter {
$0.tags.contains(platform.rawValue)
}