从图像中获取路径几何形状
如果我有一个徽标,可以说是 jpg 甚至 png 格式。 关于如何使用它来定义路径几何形状有什么建议吗? 如果可以为我如何在混合中做到这一点提供任何建议,那就太好了。 谢谢
If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我自己最近也一直在为此苦苦挣扎。 我在数据中完成了一组图标,需要更新它们以使其看起来更好。
我尝试了一切,手动输入它们。 在 svg 中绘图,将 svg 转换为 xaml。
最后我从谷歌材料图标中找到了一个开源图标列表。
然后我用它从 svg 文件转换为数据
https://github.com/BerndK/SvgToXaml
它效果很好,但不适用于我自己绘制的图标。
我决定将我转换的所有图标数据放入我自己构建的应用程序中,该应用程序将为您提供数据和图标预览。 请随意使用和贡献。 我会尽可能继续更新。
https://github.com/sgreaves1/XamlIcons
I have recently been struggling with this myself. I had a set of icons done in data and needed to update them to look nicer.
I tried everything, manually typing them out. drawing in svg, converting svg to xaml.
in the end i found a list of open source icons from google material icons.
I then used this to convert from the svg files to data
https://github.com/BerndK/SvgToXaml
It works well but not for the icons i drew myself.
I decided to place all the icons data i convert into an app i built myself that will give you the data and a preview of the icon. feel free to use and contribute. I will keep updating as much as i can.
https://github.com/sgreaves1/XamlIcons
在在线转换器中将您的图像从 png 转换为 svg,然后将文件放入此站点 http://inloop.github。 io/svg2android/ 您将看到图像的路径数据,如下图所示。
Convert your image from png to svg in online converter, then drop file into this site http://inloop.github.io/svg2android/ and you will see pathData of your image like below shown in my image.
我已经使用 Microsoft Expression Design 4(免费版)解决了我的问题(将图像导出为 XAML)。 我已经从链接下载了
http://www.microsoft.com/en-us/download /confirmation.aspx?id=36180
作为输入,我有 Adobe Ilustrator 文件。
I've solved my problem (export an image as XAML) using Microsoft Expression Design 4 (Free Version). I've downloaded from the link
http://www.microsoft.com/en-us/download/confirmation.aspx?id=36180
As input, I had Adobe Ilustrator files.
我有一个好主意,但你的 png、bmp、jpg 或其他非矢量文件必须非常简单,因为我们需要最佳扫描结果并且只使用 inkscape。
提示:如果您的图像是白色的,顶部菜单项文件->文档属性-> 哎呀棋盘背景,如果你想取消选中页面边框显示。
但此方法可能并不总是有效,或者可能无法给出所需的结果,并使用 scape 绘制您自己的形状,以便您可以从 XML 编辑器获取路径数据。
例如,我的第一次测试如下:
并进行更多处理后:
I have a good idea but you're png, bmp, jpg or other non vector file is must be very simple because we need best scan results and only use inkscape.
Tip: If your image is color white, Top menu item File->Document Properties-> heck Checkerboard Background and if you want uncheck Page border show.
But this method may not always work or may not give the desired results and draw your own shapes with the scape so you can get the path data from the XML editor.
Example, my first tests this like:
and after working on it some more:
Adobe Illustrator / CorelDraw 可能是我使用过的执行这些操作的最佳工具。
就我个人而言,我更喜欢用插画来制作屏幕媒体。 这些跟踪可以导出为多种格式,例如 EPS、SVG、AI,甚至 XAML(使用此 插件)
祝你好运!!!!
Adobe Illustrator / CorelDraw is perhaps the best tool out there for these operations that I have used.
Personally, I prefer illustrator for on-screen media. These tracings can be exported into several formats such as EPS, SVG, AI, or even XAML (with this plugin)
Best of Luck !!!!
Jasema 是一个非常适合这项工作的工具。
另外,不要羞于使用 Blend - 它使用起来有些困难(使用笔绘制形状),但它很快就会变得更容易。 打开网格线并可选择对齐它们以获得良好的效果。
Jasema 和 Blend 都缺乏的是轻松创建具有中心对称形状(如星星)的能力,因此我从 Jasema 中获取了部分内容并创建了自己的工具(名为 Radius),其工作原理有点像尺子和罗盘。
Jasema is a terrific tool right for the job.
Also, don't be shy to use Blend - it is somewhat more difficult to use (drawing shapes using pen) but it gets easier pretty fast. Switch on gridlines and optionally snap to them for good results.
What both Jasema and Blend are lacking, is the ability to easily create shapes with a central symmetry (like stars), so I took parts from Jasema and created my own tool (named Radius) that works a bit like a combination of a ruler and compass.
是的 - 两天前我刚刚为 LOB 应用程序解决了这个问题。
我无法为 Blend 提供建议(尽管我读到它可以在 Expression Designer 中完成)。 不过,我为此找到的最好的免费工具是 InkScape (http://www.inkscape.org/)。 inkscape.org)。
它是开源的,虽然它主要用于编辑基于 SVG 矢量的图像,但它有两个对我们 WPFers 有用的关键功能:
您总是会发现,与尝试转换位图/相比,加载矢量格式(如 SVG、EMF、WMF 等)并保存到 XAML 会获得更好的结果/ jpeg...只是因为矢量化光栅图像的过程最容易出错。 因此,如果您想将公司徽标引入 XAML,请尝试获取用于创建徽标的源文件(可能是在 Illustrator 中完成的?)并将其导入 InkScape。
如果这篇文章有帮助,请善意地给它一个赞。
Yes - I just tackled this problem for an LOB application two days ago.
I can't offer advice for Blend (though I've read that it can be done in Expression Designer). However, the best free tool I've found for this is called InkScape (http://www.inkscape.org).
It's opensource, and while it's intended primarily for editing SVG vector-based images, it has two key features that are useful to us WPFers:
You'll invariably find that you get better results from loading vector formats (like SVG, EMF, WMF, etc) and saving to XAML, than if you try to convert a bitmap/jpeg... simply because the process of vectorizing a raster image is error prone at best. So if you want to bring a company logo into XAML, try to get hold of the source files used to create the logo (perhaps done in Illustrator?) and import that into InkScape.
If this post is helpful, please be kind and give it a one-up.