tcc/ASP.NET/Services/ImageService.cs

25 lines
536 B
C#
Raw Normal View History

2023-11-02 22:14:16 +00:00
namespace TCC.Services
2023-08-16 18:58:01 +00:00
{
public class ImageService
{
public ImageService() { }
2023-08-20 20:21:58 +00:00
public void SaveImage(Stream fileStream)
{
var file = File.Create("image.png");
fileStream.CopyToAsync(file);
file.Close();
}
2023-09-11 02:14:21 +00:00
public byte[] GetSimpleImage()
2023-08-20 20:21:58 +00:00
{
2023-09-11 02:14:21 +00:00
return File.ReadAllBytes("static/small-image.png");
2023-08-20 20:21:58 +00:00
}
2023-09-11 02:14:21 +00:00
public byte[] GetBigImage()
2023-08-20 20:21:58 +00:00
{
2023-09-11 02:14:21 +00:00
return File.ReadAllBytes("static/big-image.png");
2023-08-20 20:21:58 +00:00
}
2023-08-16 18:58:01 +00:00
}
}