Get path geometry from image

前端 未结 7 1289
忘掉有多难
忘掉有多难 2020-12-31 08:36

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

7条回答
  •  天命终不由人
    2020-12-31 09:04

    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.

提交回复
热议问题