从图像中获取路径几何形状

发布于 2024-07-23 12:45:15 字数 96 浏览 9 评论 0原文

如果我有一个徽标,可以说是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

小嗲 2024-07-30 12:45:18

我自己最近也一直在为此苦苦挣扎。 我在数据中完成了一组图标,需要更新它们以使其看起来更好。

我尝试了一切,手动输入它们。 在 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

紫瑟鸿黎 2024-07-30 12:45:18

在在线转换器中将您的图像从 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.
enter image description here

生来就爱笑 2024-07-30 12:45:17

我已经使用 Microsoft Expression Design 4(免费版)解决了我的问题(将图像导出为 XAML)。 我已经从链接下载了
http://www.microsoft.com/en-us/download /confirmation.aspx?id=36180

作为输入,我有 Adob​​e 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.

千寻… 2024-07-30 12:45:17

我有一个好主意,但你的 png、bmp、jpg 或其他非矢量文件必须非常简单,因为我们需要最佳扫描结果并且只使用 inkscape。

  1. 步骤:将文件工作区拖放到 Inkscape 上,免费下载

提示:如果您的图像是白色的,顶部菜单项文件->文档属性-> 哎呀棋盘背景,如果你想取消选中页面边框显示

  1. 步骤:顶部菜单项路径-> 跟踪位图-> Mode 检查您想要的属性,我通常 使用 color 属性,如果您的文件是 png,请选中“删除背景”,然后单击确定,然后再次等待“确定”按钮启用并关闭窗口。
  2. 步骤:现在您有一个两层,顶层矢量文件和底层文件。 选择矢量文件和顶部菜单项编辑-> XML编辑器-> 选择svg路径并查看数据路径中的侧栏名称属性。

但此方法可能并不总是有效,或者可能无法给出所需的结果,并使用 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.

  1. Step: Drag and drop your file workspace on Inkscape, download free.

Tip: If your image is color white, Top menu item File->Document Properties-> heck Checkerboard Background and if you want uncheck Page border show.

  1. Step: Top menu item Path-> Trace Bitmap-> Mode check what you want property, i usually use color property and if your file is png check Remove Background then click OK, then wait again Ok button is Enable and close window.
  2. Step: Now you have a two layer, top layer vektor file and bottom layer your file. Select vector file and top menu item Edit-> XML Editor-> select svg path and look side column, d name propery in your data path value.

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:enter image description here

and after working on it some more:enter image description here

把梦留给海 2024-07-30 12:45:17

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 !!!!

楠木可依 2024-07-30 12:45:16

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.

只是偏爱你 2024-07-30 12:45:16

是的 - 两天前我刚刚为 LOB 应用程序解决了这个问题。

我无法为 Blend 提供建议(尽管我读到它可以在 Expression Designer 中完成)。 不过,我为此找到的最好的免费工具是 InkScape (http://www.inkscape.org/)。 inkscape.org)。

它是开源的,虽然它主要用于编辑基于 SVG 矢量的图像,但它有两个对我们 WPFers 有用的关键功能:

  1. 它可以矢量化(即“跟踪”)光栅图像,例如位图和 jpeg,尽管不如一个希望,并且
  2. 它可以将矢量图像导出为 XAML

您总是会发现,与尝试转换位图/相比,加载矢量格式(如 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:

  1. It can vectorize (i.e. "trace") raster images like bitmaps and jpegs, albeit not as well as one would hope, and
  2. It can export the vector image as XAML

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文