Optimise for minimal memory
This commit is contained in:
@@ -15,12 +15,25 @@ public class HomeController(IMediator mediator) : ControllerBase
|
||||
return Ok(await mediator.Send(new Weather.Command()));
|
||||
}
|
||||
|
||||
[HttpGet("default.png")]
|
||||
[HttpGet("default.bmp")]
|
||||
public async Task<IActionResult> GetImage()
|
||||
{
|
||||
return File(await mediator.Send(new ImageGeneration.Command()), "image/png");
|
||||
return File(await mediator.Send(new ImageGeneration.Command()), "image/bmp");
|
||||
}
|
||||
|
||||
/*[HttpGet("screen/buffers")]
|
||||
public async Task<IActionResult> GetCombinedBuffers()
|
||||
{
|
||||
var (black, red) = await mediator.Send(new ImageGeneration.Command());
|
||||
|
||||
// Combine buffers
|
||||
byte[] combined = new byte[black.Length + red.Length];
|
||||
Buffer.BlockCopy(black, 0, combined, 0, black.Length);
|
||||
Buffer.BlockCopy(red, 0, combined, black.Length, red.Length);
|
||||
|
||||
return File(combined, "application/octet-stream");
|
||||
}*/
|
||||
|
||||
[HttpGet("departureboard")]
|
||||
public async Task<ActionResult<List<TimeTable>>> GetDepartureBoard()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user