mirror of https://github.com/ivanch/tcc.git
25 lines
536 B
C#
25 lines
536 B
C#
namespace TCC.Services
|
|
{
|
|
public class ImageService
|
|
{
|
|
public ImageService() { }
|
|
|
|
public void SaveImage(Stream fileStream)
|
|
{
|
|
var file = File.Create("image.png");
|
|
fileStream.CopyToAsync(file);
|
|
file.Close();
|
|
}
|
|
|
|
public byte[] GetSimpleImage()
|
|
{
|
|
return File.ReadAllBytes("static/small-image.png");
|
|
}
|
|
|
|
public byte[] GetBigImage()
|
|
{
|
|
return File.ReadAllBytes("static/big-image.png");
|
|
}
|
|
}
|
|
}
|