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();
            }
        }
    }
}
