solve edge case
This commit is contained in:
parent
741d34a5e0
commit
0472bfe58e
15 changed files with 685 additions and 47 deletions
|
|
@ -25,6 +25,8 @@ public static class ImageController
|
|||
|
||||
response.StatusCode = 200;
|
||||
response.ContentType = "image/png";
|
||||
|
||||
Console.WriteLine($"Generate image for {dto}");
|
||||
|
||||
await tileManager
|
||||
.CreateSection(dto)
|
||||
|
|
|
|||
|
|
@ -69,4 +69,9 @@ public class GenerateImageDto
|
|||
yield return (fieldName, $"{fieldName} must be less than or equal to {max}.");
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"CoordinatePair: {CanvasRect}, Crop: [{CropOffset![0]} {CropOffset[1]} {CropSize![0]} {CropSize[1]}], OutputScale: {OutputScale}";
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ using StitchATon2.Domain;
|
|||
|
||||
var builder = WebApplication.CreateSlimBuilder(args);
|
||||
|
||||
using var tileManager = new TileManager(Configuration.Default);
|
||||
var tileManager = new TileManager(Configuration.Default);
|
||||
builder.Services.AddSingleton(tileManager);
|
||||
|
||||
builder.Services.ConfigureHttpJsonOptions(options =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue