Skip to content

Commit

Permalink
Rename compressed images on validation to a name that doesn't use the…
Browse files Browse the repository at this point in the history
… hash of the original image
  • Loading branch information
tr4wzified committed Oct 25, 2024
1 parent 9ee1fa3 commit 9b0920d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Wabbajack.CLI/Verbs/ValidateLists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public async Task<int> Run(AbsolutePath reports, AbsolutePath otherArchives)
var height = standardWidth * image.Height / image.Width;
image.Mutate(x => x
.Resize(standardWidth, height));
largeImage = validatedList.RepositoryName.ToRelativePath().Combine(hash.ToHex()+"_large").WithExtension(Ext.Webp);
largeImage = validatedList.RepositoryName.ToRelativePath().Combine(validatedList.Links.MachineURL + "_large").WithExtension(Ext.Webp);
await image.SaveAsync(largeImage.RelativeTo(reports).ToString(), new WebpEncoder {Quality = 85}, cancellationToken: token);
}

Expand All @@ -280,7 +280,7 @@ public async Task<int> Run(AbsolutePath reports, AbsolutePath otherArchives)
var height = standardWidth * image.Height / image.Width;
image.Mutate(x => x
.Resize(standardWidth, height));
smallImage = validatedList.RepositoryName.ToRelativePath().Combine(hash.ToHex()+"_small").WithExtension(Ext.Webp);
smallImage = validatedList.RepositoryName.ToRelativePath().Combine(validatedList.Links.MachineURL + "_small").WithExtension(Ext.Webp);
await image.SaveAsync(smallImage.RelativeTo(reports).ToString(), new WebpEncoder {Quality = 75}, cancellationToken: token);
}

Expand Down

0 comments on commit 9b0920d

Please sign in to comment.