11

Does anyone know of any way to convert a simple gif to xaml? E.G. A tool that would look at an image and create elipses, rectangles and paths based upon a gif / jpg / bitmap?

Peter Walke
  • 2,497
  • 6
  • 33
  • 50

4 Answers4

22

Inkscape can trace bitmaps, and can save directly to XAML. And, it happens to be free. I've used it to trace a lot of bitmaps and it's worked really well for me.

Jon Galloway
  • 52,327
  • 25
  • 125
  • 193
  • Inkscape *does* generate xaml, but it doesn't work in practice. All it does is make the source of an image the base64 version of the original image. Not only does that not work in the VS2015 designer ("Blend does not support this file format") (or at run time), but I'm pretty sure that's not a scalable image. – dudeNumber4 Oct 20 '16 at 21:48
  • Maybe something has changed since Oct 2016 - it worked GREAT for me this weekend (Jan 2018)! Definitely VECTOR XAML output for my project! There is an amazing bitmap trace capability with several options. If necessary, you can follow up with vector node edits to clean up any trouble spots. – Doug L. Feb 06 '18 at 10:03
  • I just tried inkscape and did Save As "XAML. It is indeed just a base-64 encoded image. " – Shaun Apr 24 '20 at 17:44
  • @dudeNumber4 the original image should be traced first. See the following question for more details: https://stackoverflow.com/questions/7097949/create-vector-from-image – Danila Kireev Jun 18 '20 at 09:32
11

Illustrator has a trace tool which will do this

a cheaper option might be

http://vectormagic.com

it will export a svg that you should be able to convert to xaml

Mesh
  • 6,262
  • 5
  • 34
  • 53
  • I compared both Illustrator and Expression Design's tracing abilities, and Illustrator's was more accurate (not too surprised). This seems like one of those tasks where you need to pay for right tool for the job. – Peter Walke Dec 22 '09 at 20:13
  • Thanks for the input. I ended up using this approach. I also tried expression design, but the tracing wasn't very accurate. – Peter Walke Mar 06 '11 at 20:25
2

A combination of Vector Magic followed by ViewerSVG produces the best quality results for me.

Thomas Bratt
  • 48,038
  • 36
  • 121
  • 139
0

With this online converter you can convert an image to SVG Format. then download Converted File and open it in a text File Editor then you can easily copy path data

image.online-convert

Mamad
  • 446
  • 5
  • 22