本文介绍了从图像创建矢量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我读过 1,000 篇帖子说这是可能的,但对于我的生活,我找不到如何从 PNG 在 XAML 中创建矢量.有人可以给我指出任何解释我如何从 PNG 创建矢量以在 WPF 应用程序中使用的帖子吗?
I've read 1,000 posts saying it's possible, but for the life of me, I can't find how to create a vector in XAML from a PNG. Could somebody please point me to any posts that explain how I can create a vector from a PNG for use in a WPF application?
推荐答案
希望这会有所帮助
下载并安装 Inkscape(在内部使用 Potrace).这是一篇关于这个主题的好文章:
使用 Potrace 将位图矢量化为 XAML 和墨景.
这是链接的摘要..
Download and install Inkscape (internally using Potrace). Here is a good article on the subject:
Vectorize Bitmaps to XAML using Potrace and Inkscape.
Here is a summary from the link..
- 运行 Inkscape
- 选择文件 -> 打开"并浏览至 PNG
- 当询问链接或嵌入图片:"时,选择嵌入"
- 用鼠标选择新打开的图片
- 选择路径 -> 跟踪位图..."
- 在多次扫描:创建一组路径" GroupBox 中选择颜色"
- 选择确定"执行跟踪
- 关闭跟踪位图"窗口
- 通过选择编辑 -> 反转选择"来删除原始图像,然后按 Delete 键.
- 选择文件->另存为...",选择Microsoft XAML"并保存
- Run Inkscape
- Select "File -> Open" and browse to PNG
- When asked about "Link or embed image:", select "embed"
- Select the newly opened image with the Mouse
- Select "Path -> Trace Bitmap..."
- Select "Colors" in the "Multiple scans: create a group of paths" GroupBox
- Select "OK" to execute the trace
- Close the "Trace Bitmap" Window
- Delete the original image by selecting "Edit -> Invert Selection" and press Delete.
- Choose "File -> Save As...", select "Microsoft XAML" and save
..并且您应该将 XAML 文件从 PNG 转换.
..and you should have your XAML file converted from a PNG.
这篇关于从图像创建矢量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!