fix path
This commit is contained in:
parent
ce95630cc6
commit
3b943b95e1
2 changed files with 11 additions and 3 deletions
|
|
@ -6,7 +6,15 @@ internal record Coordinate
|
|||
public string Name { get; }
|
||||
public int Row { get; }
|
||||
public int Col { get; }
|
||||
public string Path => BasePath + Name + ".png";
|
||||
|
||||
public string FullPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string filename = Name + ".png";
|
||||
return Path.Combine(BasePath, filename);
|
||||
}
|
||||
}
|
||||
|
||||
public Coordinate(string name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public class ImageGenerator
|
|||
string[] inputs = requestBody.CanvasRect.Split(":");
|
||||
double scale = requestBody.OutputScale;
|
||||
Coordinate a1 = new Coordinate("A1");
|
||||
Mat a1Mat = new Mat(a1.Path);
|
||||
Mat a1Mat = new Mat(a1.FullPath);
|
||||
int width = a1Mat.Width;
|
||||
int height = a1Mat.Height;
|
||||
if (scale < 1)
|
||||
|
|
@ -36,7 +36,7 @@ public class ImageGenerator
|
|||
{
|
||||
try
|
||||
{
|
||||
Mat mat = new Mat(item.Path);
|
||||
Mat mat = new Mat(item.FullPath);
|
||||
if (scale < 1)
|
||||
{
|
||||
mat = mat.Resize(new Size(width, height));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue