Integrating Images Project

This commit is contained in:
FlorianDahn
2021-11-28 23:20:56 +01:00
parent 65ec7f1c2b
commit e28663138b
7 changed files with 93 additions and 69 deletions
-22
View File
@@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TelegramBotBase.Tools
{
public static class Images
{
public static Stream ToStream(this Image image, ImageFormat format)
{
var stream = new System.IO.MemoryStream();
image.Save(stream, format);
stream.Position = 0;
return stream;
}
}
}