我正在尝试将图像转换为XAML代码。为此我使用“Potrace”和“SharpVectors”。 Potrace会将图像转换为SVG(标量矢量图形),SharpVectors会将SVG文件作为输入并将XAML作为输出。转换正在发生,但转换后的XAML设计并不那么清晰。图像的清晰度降低了。有关改善图像清晰度的想法吗?
Process p = new Process();
p.StartInfo.FileName = "Potrace.exe";
p.StartInfo.Arguments = "-s " +"test.bmp"+ " -o " + "test.svg" ;
p.Start();
xamlcreator.Convert("test.svg");
xamlcreator是一个从SharpVectors dll使用的函数。
答案 0 :(得分:0)
您没有使用缩放和展示位置选项:
-P, --pagesize format - page size (default is letter)
-W, --width dim - width of output image
-H, --height dim - height of output image
-r, --resolution n[xn] - resolution (in dpi) (dimension-based backends)
-x, --scale n[xn] - scaling factor (pixel-based backends)
-S, --stretch n - yresolution/xresolution
-A, --rotate angle - rotate counterclockwise by angle
-M, --margin dim - margin
-L, --leftmargin dim - left margin
-R, --rightmargin dim - right margin
-T, --topmargin dim - top margin
-B, --bottommargin dim - bottom margin
参考Potrace