Mise à jour du dépôt en fonction du .gitignore

This commit is contained in:
Troispoils 2024-02-25 22:03:08 +01:00
parent 1f0f033fad
commit 4a59748e67
224 changed files with 6785 additions and 0 deletions

View file

@ -0,0 +1,14 @@
using ImageMagick;
namespace LandblockExtraction.Tools;
public static class ImageTools {
public static byte[] DdsToPng(Stream stream) {
using (IMagickImage image = new MagickImage(stream)) {
image.Format = MagickFormat.Jpg;
using (MemoryStream memoryStream = new MemoryStream()) {
image.Write(memoryStream);
return memoryStream.ToArray();
}
}
}
}