views:

1748

answers:

4

I have an AI file. I paste it into Expression Blend and then export the XAML for use in my WPF project. Works for most of my files, but some export the XAML plus a seperate png file. What can I do so that the png is embedded into the paths of my image and not a seperate image? Can it be done?

+1  A: 

It sounds like the PNG that is generated is probably the raster part of your AI file, and it can't be converted to vector graphics. Are you importing PNGs, or JPGs, or another raster graphic into your AI file?

Terrapin
I don't know. I was given an AI file and tasked with converting it to XAML. Most of them work except a few.
Scott
I would like through the AI files that don't work and see they contain non-vector (a.k.a. Raster) graphics. You can tell by trying to resize the graphics - make them much larger. The vector graphics will scale infinitely without pixelation. Raster graphics will pixelate as they scale.
Terrapin
+2  A: 

Checkout this page that describes converting raster graphics to vector and then XAML -

http://weblogs.asp.net/rrobbins/archive/2007/11/11/how-to-convert-raster-graphics-to-xaml.aspx

Terrapin
+2  A: 

Another route that you could try is to use Expression Design to convert the .ai file.

(Please note that once you have Expression Design open, you need to create a new document before the File->Import menu item is even enabled.)

However, once you convert the .ai file with Expression Design, you will likely still have the problem of having some raster information in the .ai ... which as Terrapin already mentions is hard to convert to vector (and usually brings a high memory footprint to get even close to the quality of the raster image).

But to help you out there, Expression Design also comes with some ability to convert raster information into vector. If you select the image that you want to convert, just go to Object->Image->Auto Trace Image in order to convert it.

See this StackOverflow question for more info, but basically Microsoft allows you to download a trial that you can use for 90 days.

Hope that helps.

cplotts
Heh. Didn't see that you were the original poster of the other 'How do I convert an Illustrator file to a path for WPF' question ...
cplotts
A: 

To convert raster images to vectorial images, I found Inkscape (free) to do an excellent job (comparable to VectorMagic, which is not free anymore by the way).

In Inkscape, import your image and use the Path/Trace Bitmap function. It has a lot of control.

Once you converted to a vectorial image, save it as a SVG. Then, using ViewerSvg, you can convert to XAML vector data. (Path & Canvas)

decasteljau