Mise à jour du dépôt en fonction du .gitignore
This commit is contained in:
parent
1f0f033fad
commit
4a59748e67
224 changed files with 6785 additions and 0 deletions
14
LandblockExtraction/Tools/ImageTools.cs
Normal file
14
LandblockExtraction/Tools/ImageTools.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue