Page 1 of 1

AI to DXF conversion were pixelated

Posted: 2017-09-03T23:04:10-07:00
by naiyar.azam
Hi Team,

I am using IM Version: ImageMagick 7.0.5-1 Q16 x64 2017-03-04
http://www.imagemagick.org, for some of my use cases,
i am trying to convert .ai file to .dxf file format using command line, but
the output .dxf file getting pixelated.

How to avoid this?
Can IM convert from vector to vector ? As both .ai and .dxf are vector
file .

I used following commands to convert:
1. magick input_file.ai -units PixelsPerInch -density 300 output_file.dxf
2. magick input_file.ai output_file.dxf

But in both cases I am getting output_file as pixelated.

Re: AI to DXF conversion were pixelated

Posted: 2017-09-04T00:09:36-07:00
by Bonzo
Imagemagick is a raster image program so I would guess it converts the svg to a raster format, processes and the outputs as an svg.

Re: AI to DXF conversion were pixelated

Posted: 2017-09-04T10:19:05-07:00
by GeeMack
naiyar.azam wrote: 2017-09-03T23:04:10-07:00I used following commands to convert:
1. magick input_file.ai -units PixelsPerInch -density 300 output_file.dxf
2. magick input_file.ai output_file.dxf

But in both cases I am getting output_file as pixelated.
When converting vector graphics with IM you will usually get better results by setting the density before reading in the input image. Try something like this...

Code: Select all

magick -units PixelsPerInch -density 300 input_file.ai output_file.dxf

Re: AI to DXF conversion were pixelated

Posted: 2017-09-04T11:45:05-07:00
by fmw42
ImageMagick 7.0.5-1 is about 20 versions old. You might want to upgrade. But ImageMagick is not a good vector to vector processor. It will read the vector file and rasterize it and then if you want a vector output each pixel will be vector dots. If you still want to go that route, then GeeMack's code is correct. You need to set the density before reading the AI image to get high resolution. If after reading the image, it is too big, you can always resize to minimize it.

It is always best to provide an example input and output. That way we can test any issue you find. You can upload to any free hosting service that will not change your image formats, such as dropbox.com and then put the URLs here.

I am on a Unix-like system (Mac OSX) and not Windows. But I do not see DXF format listed at the ImageMagick supported formats page at http://www.imagemagick.org/script/formats.php#supported.

Nor do I see it listed when I do

Code: Select all

convert -list format
Perhaps it is available on Windows systems. So try my command and see if you can find it.